-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Open
Labels
Milestone
Description
Related discussion: #92238 (comment)
Since that issue was closed I'm opening a new one.
> dotnet --info
.NET SDK:
Version: 9.0.100
Commit: a2bc464e40
Workload version: 9.0.100-manifests.6bf02610
MSBuild version: 17.12.7+a2bc464e4
My .csproj
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>true</InvariantGlobalization>
<BlazorEnableTimeZoneSupport>false</BlazorEnableTimeZoneSupport>
<BlazorWebAssemblyPreserveCollationData>false</BlazorWebAssemblyPreserveCollationData>
<WasmExceptionHandling>true</WasmExceptionHandling>
<WasmSIMD>false</WasmSIMD>
</PropertyGroup>
Publish command
dotnet publish UI.csproj -c Release -p:RunAOTCompilation=true -p:WasmStripILAfterAOT=true
The size of dotnet.native.wasm.gz
on:
- dotnet 8 with WasmStripILAfterAOT=false - 3.7MB
- dotnet 8 with WasmStripILAfterAOT=true - 2.5MB (but the app fails to launch)
- dotnet 9 with WasmStripILAfterAOT=true - 4MB
You can find a published app here:
https://iseiryu.github.io/blazor-aot
https://github.com/iSeiryu/iseiryu.github.io/tree/main/blazor-aot
Source code:
https://github.com/iSeiryu/blazor-wasm-experiments