Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Debugging and hot reload is broken when app base path is changed in index.html
and launchsettings.json
.
Expected Behavior
Debugging and hot reload with a different base path should work
Steps To Reproduce
Repo reproducing problem here:
https://github.com/daytonjallen/HotReloadPathIssueRepro
- Start new blazor wasm project
- Update base path in index.html
- Update paths in launchsettings.json (problem exists when using both the IIS & http run configs)
- Try to debug project
App will fail to load due to exceptions from not finding blazor-hotreload.js etc:
Exceptions (if any)
blazor.webassembly.js:1
System.AggregateException: One or more errors occurred. (Failed to fetch dynamically imported module: http://localhost:65439/_framework/blazor-hotreload.js
TypeError: Failed to fetch dynamically imported module: http://localhost:65439/_framework/blazor-hotreload.js)
---> Microsoft.JSInterop.JSException: Failed to fetch dynamically imported module: http://localhost:65439/_framework/blazor-hotreload.js
TypeError: Failed to fetch dynamically imported module: http://localhost:65439/_framework/blazor-hotreload.js
at Microsoft.JSInterop.JSRuntime.d__16`1[[Microsoft.JSInterop.IJSObjectReference, Microsoft.JSInterop, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
at Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload.InitializeAsync()
at Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHost.RunAsyncCore(CancellationToken cancellationToken, WebAssemblyCultureProvider cultureProvider)
at Program.
--- End of inner exception stack trace ---
.NET Version
7.0.200
Anything else?
Visual Studio Version: 17.5.0