From 44bc206de37e81c03bd1c70c815fc7cff7c1bd44 Mon Sep 17 00:00:00 2001 From: Todd T <21184383+LostBeard@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:23:47 -0400 Subject: [PATCH 1/2] Update webassembly.md Corrected documentation to reflect the compression flag name change from BlazorEnableCompression to CompressionEnabled as described here https://github.com/dotnet/aspnetcore/issues/50451 --- aspnetcore/blazor/host-and-deploy/webassembly.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aspnetcore/blazor/host-and-deploy/webassembly.md b/aspnetcore/blazor/host-and-deploy/webassembly.md index 991833cdf616..dc97950e0200 100644 --- a/aspnetcore/blazor/host-and-deploy/webassembly.md +++ b/aspnetcore/blazor/host-and-deploy/webassembly.md @@ -164,18 +164,18 @@ Blazor relies on the host to serve the appropriate compressed files. When using For more information on loading boot resources, see . -To disable compression, add the `BlazorEnableCompression` MSBuild property to the app's project file and set the value to `false`: +To disable compression, add the `CompressionEnabled` MSBuild property to the app's project file and set the value to `false`: ```xml - false + false ``` -The `BlazorEnableCompression` property can be passed to the [`dotnet publish`](/dotnet/core/tools/dotnet-publish) command with the following syntax in a command shell: +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:BlazorEnableCompression=false +dotnet publish -p:CompressionEnabled=false ``` ## Rewrite URLs for correct routing From 6011ee846f30c6f135c6b6c07c0e8d37647d7c98 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Fri, 1 Sep 2023 12:06:22 -0400 Subject: [PATCH 2/2] Updates --- .../blazor/host-and-deploy/webassembly.md | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/aspnetcore/blazor/host-and-deploy/webassembly.md b/aspnetcore/blazor/host-and-deploy/webassembly.md index dc97950e0200..e8ff7e99aa8b 100644 --- a/aspnetcore/blazor/host-and-deploy/webassembly.md +++ b/aspnetcore/blazor/host-and-deploy/webassembly.md @@ -164,6 +164,9 @@ 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 @@ -178,6 +181,26 @@ The `CompressionEnabled` property can be passed to the [`dotnet publish`](/dotne 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 + + false + +``` + +The `BlazorEnableCompression` 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: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: