Skip to content

Built-in support for client-side decompression of precompressed resources #26091

@mrpmorris

Description

@mrpmorris

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pillar: Dev ExperiencePriority:2Work that is important, but not critical for the releaseaffected-mostThis issue impacts most of the customersarea-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-boot-upfeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyfeature-templatesseverity-minorThis label is used by an internal tool

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions