diff --git a/aspnetcore/blazor/host-and-deploy/webassembly.md b/aspnetcore/blazor/host-and-deploy/webassembly.md index 991833cdf616..e8ff7e99aa8b 100644 --- a/aspnetcore/blazor/host-and-deploy/webassembly.md +++ b/aspnetcore/blazor/host-and-deploy/webassembly.md @@ -164,6 +164,27 @@ Blazor relies on the host to serve the appropriate compressed files. When using For more information on loading boot resources, see . + +:::moniker range=">= aspnetcore-8.0" + +To disable compression, add the `CompressionEnabled` MSBuild property to the app's project file and set the value to `false`: + +```xml + + false + +``` + +The `CompressionEnabled` property can be passed to the [`dotnet publish`](/dotnet/core/tools/dotnet-publish) command with the following syntax in a command shell: + +```dotnetcli +dotnet publish -p:CompressionEnabled=false +``` + +:::moniker-end + +:::moniker range="< aspnetcore-8.0" + To disable compression, add the `BlazorEnableCompression` MSBuild property to the app's project file and set the value to `false`: ```xml @@ -178,6 +199,8 @@ The `BlazorEnableCompression` property can be passed to the [`dotnet publish`](/ dotnet publish -p:BlazorEnableCompression=false ``` +:::moniker-end + ## Rewrite URLs for correct routing Routing requests for page components in a Blazor WebAssembly app isn't as straightforward as routing requests in a Blazor Server, hosted app. Consider a Blazor WebAssembly app with two components: