Skip to content

Commit b91dd20

Browse files
committed
Always download blazor-hotreload.js from app root
The middleware that we inject always listens to the root of the app. While this might not play very nicely if the app is running off a virtual path, listening to the root is what we do with the aspnet-browser-refresh.js script and we've had no issue reports with it thus far. Fixes #35555
1 parent 64f1b6e commit b91dd20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Components/WebAssembly/WebAssembly/src/HotReload/WebAssemblyHotReload.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ internal static async Task InitializeAsync()
2929

3030
// Attempt to read previously applied hot reload deltas. dotnet-watch and VS will serve the script that can provide results from local-storage and
3131
// the injected middleware if present.
32-
var jsObjectReference = (IJSUnmarshalledObjectReference)(await DefaultWebAssemblyJSRuntime.Instance.InvokeAsync<IJSObjectReference>("import", "./_framework/blazor-hotreload.js"));
32+
var jsObjectReference = (IJSUnmarshalledObjectReference)(await DefaultWebAssemblyJSRuntime.Instance.InvokeAsync<IJSObjectReference>("import", "/_framework/blazor-hotreload.js"));
3333
await jsObjectReference.InvokeUnmarshalled<Task<int>>("receiveHotReload");
3434
}
3535

0 commit comments

Comments
 (0)