Implementation plan
Deployment scenarios
Deployment shapes
- Smallest possible loader + emscripten.js X one dotnet.js
- Inlined config in loader X separate config file
- Dlls/webcil and other assets X memory snapshot
It will cover various needs
- NPM/react/etc integration: "we want single file that is webpack friendly"
- Blazor leaves config loading to runtime, but doesn't loose perf boost from not waiting on dotnet.js download
- Separate assets beter utilize HTTP cache
Browser vs Wasi
- The same SDK
Microsoft.NET.Sdk.WebAssembly.Pack
- All the code could probably be ported to existing runtime sdk
- Trigger by RID
browser-wasm x wasi-wasm
- RID defaults to
browser-wasm
- Shares a common package
Microsoft.NET.Sdk.WebAssembly.Pack
- Differences based on RID, can possibly split the package in the future
Browser SDK responsibilities
StaticWebAssets SDK <- (Runtime) Wasm SDK <- Blazor SDK
- StaticWebAssets SDK
- FileFingerPrinting
- BrotliCompress
- GzipCompress
- Wasm SDK
- BootJson
- ServiceWorker
- GetFileHash
- AppSettings.json
- BlazorWasm.web.config
- Bundle transformation + ResourceLoader
- Blazor SDK
- BlazorTrimming
- Blazor specific config bits
From blazor
others
JS startup
Implementation plan
Produce a fixed Wasm SDK pack version that is backward compatible for Blazor in .NET 6 and 7wasmconsoletemplate to WebAssembly SDK #102743Deployment scenarios
Deployment shapes
It will cover various needs
Browser vs Wasi
Microsoft.NET.Sdk.WebAssembly.Packbrowser-wasmxwasi-wasmbrowser-wasmMicrosoft.NET.Sdk.WebAssembly.PackBrowser SDK responsibilities
StaticWebAssets SDK <- (Runtime) Wasm SDK <- Blazor SDK
From blazor
JSHost.ImportAsync#74815WebAssemblyConfigLoader)JSImportJSImportothers
@(Content)etc.jsfiles too, including workersJS startup