Hello,
Now when I publish blazor webassembly app it is generating uncompressed, gzip compressed and brotli compressed files.
Can it be configured somehow which one developer wants to get?
I personally want only uncompressed files because I do compression and azure static website deploy using my own utility, so I do not want to wait before VS will compress gzip and brotli lot of files and then I should care to remove them from published folder.
Any option to turn generating compressed files off?
Thank you.
@Lupusa87 there's an MSBuild flag to turn off compression. You can set BlazorEnableCompression to false to turn it off
Thank you @javiercn
It should be documented somewhere, is it?
For questions like this we do dot have to disturb you.
@danroth27 another blazor doc improvement idea #20890
@Lupusa87 I just put the update in on https://github.com/dotnet/AspNetCore.Docs/pull/18555.
@guardrex Thank you.
This really needs to be a flag that we can pass to the dotnet publish command.
@jhancock4d You can pass this as a flag with -p:BlazorEnableCompression=false
I'll add that approach :point_up: to the topic's content.
@javiercn That's great! Is there a way to put this in a pubxml?
Both should be in the documentation btw.
@javiercn That's great! Is there a way to put this in a pubxml?
It's not a code API it's MSBuild, so there is no way other than our docs.
The first approach already is covered. See the end of ...
I'll get it updated by EOD.
To answer my own question yes you can add this to your PropertyGroup in the pubxml
Then you can have profiles configured for publishing that do this correctly. (super useful when using capacitor)