Hi,
To follow up on this, if you request System.Private.CoreLib.wasm.br we’ll serve that pre-compressed file as-is. We don’t automatically recognize that System.Private.CoreLib.wasm.br is the pre-compressed version of System.Private.CoreLib.wasm, and we don’t auto-swap to it. I don’t think we do anything automatic like that.
To serve your pre-compressed Unity assets without Vercel re-compressing them, you can use rewrites with a has rule (Accept-Encoding: br) and set headers on the .br files. Example vercel.json:
1{2"rewrites": [3{4"source": "/:name*.wasm",5"has": [{ "type": "header", "key": "Accept-Encoding", "value": ".br." }],6"destination": "/:name.wasm.br"7},8{9"source": "/:name*.framework.js",10"has": [{ "type": "header", "key": "Accept-Encoding", "value": ".br." }],11"destination": "/:name.framework.js.br"12},13{14"source": "/:name*.data",15"has": [{ "type": "header", "key": "Accept-Encoding", "value": ".br." }],16"destination": "/:name.data.br"17}18],19"headers": [20{21"source": "/(.)\.wasm\.br",22"headers": [23{ "key": "Content-Type", "value": "application/wasm" },24{ "key": "Content-Encoding", "value": "br" },25{ "key": "Cache-Control", "value": "public, max-age=31536000, immutable" },26{ "key": "Vary", "value": "Accept-Encoding" }27]28},29{30"source": "/(.)\.framework\.js\.br",31"headers": [32{ "key": "Content-Type", "value": "application/javascript; charset=utf-8" },33{ "key": "Content-Encoding", "value": "br" },34{ "key": "Cache-Control", "value": "public, max-age=31536000, immutable" },35{ "key": "Vary", "value": "Accept-Encoding" }36]37},38{39"source": "/(.*)\.data\.br",40"headers": [41{ "key": "Content-Type", "value": "application/octet-stream" },42{ "key": "Content-Encoding", "value": "br" },43{ "key": "Cache-Control", "value": "public, max-age=31536000, immutable" },44{ "key": "Vary", "value": "Accept-Encoding" }45]46}47]48}