Skip to content

Instantly share code, notes, and snippets.

View simonziegler's full-sized avatar

Simon Ziegler simonziegler

View GitHub Profile
@SQL-MisterMagoo
SQL-MisterMagoo / README-Hosted.md
Last active May 18, 2023 22:50
Compress Static Files in wwwroot (or anywhere) in Blazor WebAssembly

Compress Static Files in Blazor WebAssembly Hosted

This goes into your msbuild config (normally csproj) and runs before the Publish Task, before files are copied to the final destination.

<!-- 2022 @SQL-MisterMagoo containing some code from (c) .NET Foundation. All rights reserved. -->

<PropertyGroup Condition="'$(_BlazorWebAssemblySdkToolAssembly)'==''">
  <_SDKRoot>$(NetCoreRoot)sdk\$(NETCoreSDKVersion)\Sdks</_SDKRoot>