Skip to content

Fingerprinting client-side assets using the old school hosted approach #121993

@Vizual-Dev

Description

@Vizual-Dev

I am using the old school hosted WASM approach for a Blazor application.

After upgrading to .NET 10 I have implemented Fingerprint client-side static assets in standalone Blazor WebAssembly apps.

When running the project from Visual Studio I and viewing the page source in the browser, I can see the import map and the fingerprinted assets:

Image

The documentation says, "In standalone Blazor WebAssembly apps during build/publish, the framework overrides placeholders in index.html with values computed during build to fingerprint static assets for client-side rendering.".

When I publish my application via the Demo.Server project the placeholders are not overridden. The index.html in the published wwwroot still contains the placeholders:

Image

If I publish the Demo.Client project directly the placeholders are overriden.

Is it possible for me to build the Demo.Server but also replace the placeholders in Demo.Client?

I have created a minimal repo to demonstrate the problem: https://github.com/Vizual-Dev/ImportMapDemo

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions