Vercel currently ignores any pre-compressed assets that are uploaded, for example /_framework/dotnet.native.wasm
, compressed to /_framework/dotnet.native.wasm.br
, and appears to retrieve the uncompressed file, and do its own compression before serving it to the client. This is inefficient, as I compress my assets with a higher level of compression at build time. I believe the behaviour is the same for gzip, however I am most concerned with br (brotli).
Note that if you call or navigate to /_framework/dotnet.native.wasm.br
directly in a browser or postman, you do get the original br compressed file (validated by file size and hash).
Current: Retrieves uncompressed file and performs own compression before serving.
Expected: Retrieves a pre-compressed file based on the incoming Accept-Encoding
header, and returns that directly, without doing any of its own compression.
Deployment URL or Custom Domain: https://matthew-parker-dev-blazor.vercel.app/
Environment (local, preview, production): production
Project Framework: Blazor Wasm
Build Settings:
Framework Preset: Other
Build Command (if not default): chmod +x build-cloudflare.sh && ./build-cloudflare.sh
Output Directory (if not default): output/wwwroot
Install Command (if not default):
Node/Runtime Version: 20.x
Package Manager: N/A
Relevant Packages: N/A