[Blazor] Failed to load JS initializer in WasmMinimal app in tests
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
```
[Severe] http://127.0.0.1:37189/subdir/WasmMinimal/_content/Microsoft.DotNet.HotReload.WebAssembly.Browser/Microsoft.DotNet.HotReload.WebAssembly.Browser.qp2w4j0l7o.lib.module.js - Failed to load resource: the server responded with a status of 404 (Not Found)
```
The URL Is correct
- App is hosted on `/subdir/`
- WasmMinimal client is hosted on `/WasmMinimal/` [RazorComponentEndpointsStartup.cs#L167](https://github.com/dotnet/aspnetcore/blob/main/src/Components/test/testassets/Components.TestServer/RazorComponentEndpointsStartup.cs#L167)
Other framework assets loaded from a similar URLs
- `http://127.0.0.1:37189/subdir/WasmMinimal/_framework/dotnet.js`
Based on it, the URL for HotReload is generally correct
- `http://127.0.0.1:37189/subdir/WasmMinimal/_content/Microsoft.DotNet.HotReload.WebAssembly.Browser/Microsoft.DotNet.HotReload.WebAssembly.Browser.qp2w4j0l7o.lib.module.js`
HotReload JS initializer relies on StaticWebAssets manifest, because it is loaded from nuget folder, whereas other framework assets are loaded from bin/wwwroot/_framework folder.
- The folder is correctly mapped in SWA manifest
- The file name including fingerprint matches what's in file system
It doesn't work for `UseBlazorFrameworkFiles("/...")` as well
Contributor guide
Assessment
This issue has not been assessed yet.