Built-in support for client-side decompression of precompressed resources #26091
Labels
affected-most
This issue impacts most of the customers
area-blazor
Includes: Blazor, Razor Components
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
feature-blazor-boot-up
feature-blazor-wasm
This issue is related to and / or impacts Blazor WebAssembly
feature-templates
Pillar: Dev Experience
Priority:2
Work that is important, but not critical for the release
severity-minor
This label is used by an internal tool
Milestone
Problem
Regarding this advice to access compressed DLLs for static hosted websites
https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-3.1#compression
When publishing to a static website it is obvious that building for Release results in smaller files than building for Debug. However, it is not obvious that we should then go to the Microsoft Docs pages and see if there is some JavaScript to use in order to reduce the download size even further.
Suggestion
Perhaps when creating a Blazor WASM app and ASP.NET Hosted is not selected, the template for the Index.html should include the suggested script in https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-3.1#compression by default.
It's better that the JS is there because it is prominent. The developer then has the option of removing it if they wish.
I imagine seeing a 14 MB download on first experience of using Blazor for a Release build would be enough to put many people off using it.
The text was updated successfully, but these errors were encountered: