Skip to content

Commit c7d8564

Browse files
authored
Publish standalone WASM w/o an HTML doc (#36554)
1 parent 8f4c600 commit c7d8564

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • aspnetcore/blazor/host-and-deploy/webassembly

aspnetcore/blazor/host-and-deploy/webassembly/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,16 @@ A *standalone deployment* serves the Blazor WebAssembly app as a set of static f
327327

328328
Standalone deployment assets are published into either the `/bin/Release/{TARGET FRAMEWORK}/publish/wwwroot` or `bin/Release/{TARGET FRAMEWORK}/browser-wasm/publish` folder, where the `{TARGET FRAMEWORK}` placeholder is the target framework.
329329

330+
:::moniker range=">= aspnetcore-10.0"
331+
332+
## Publish without an HTML document
333+
334+
When an app isn't using an HTML document produced as part of the .NET build/publish process, there's no place to write the site's [import map](https://developer.mozilla.org/docs/Web/HTML/Element/script/type/importmap). For example, this scenario occurs when publishing a standalone Blazor app for consumption by a JavaScript/SPA app through a [Blazor custom element](xref:blazor/components/js-spa-frameworks#blazor-custom-elements).
335+
336+
To avoid problems loading app resources on the client, disable [fingerprinting](xref:blazor/fundamentals/static-files#fingerprint-client-side-static-assets-in-standalone-blazor-webassembly-apps) for `blazor.webassembly.js` and `dotnet.js` by removing `<OverrideHtmlAssetPlaceholders>` MSBuild property (or set it to `false`) in the app's project file (`.csproj`).
337+
338+
:::moniker-end
339+
330340
## Azure App Service
331341

332342
Blazor WebAssembly apps can be deployed to Azure App Services on Windows, which hosts the app on IIS.

0 commit comments

Comments
 (0)