-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aspnetcore-browser-refresh injection doesn't respect path prefix #53454
Comments
Thanks for contacting us. We're moving this issue to the |
Situation is the same for Blazor WebAssembly Hosted with ASP.NET. The framework file for hot reload (aspnetcore-browser-refresh.js) does not respect UseBlazorFrameworkFiles("/app") and it is placed into the root folder instead the subpath. In addition some NUGET packages like Blazored.Modal which are using the css isolation and are importing bundle css (Blazored.Modal.bundle.scp.css) into the main css ({ASSEMBLY_NAME}.Client.styles.css) are still placing the css into root folder (_content/Blazored.Modal/) instead on subpath (subpath/_content/Blazored.Modal/) and refference is having a relative level up. See the issue here: Blazored/Modal#593 In addition there is issue with webassembly.js but in my case I managed to solve it by calling two times the app.UseStaticFiles in Server side one time without subpath and another time with the subpath #51929 |
Is there an existing issue for this?
Describe the bug
aspnetcore-browser-refresh.js
Is not served on the same path prefix as supplied toUseBlazorFrameworkFiles
.Expected Behavior
If I call
UseBlazorFrameworkFiles("/app")
I expect this file to be served from/app/_framework/aspnetcore-browser-refresh.js
like the other_framework
files.Steps To Reproduce
Create a stock Blazor app from template:
Move Blazor setup in
Program.cs
into a middleware branch:Update
App.razor
<base href="/app/"/>
Load application and observe that
aspnetcore-browser-refresh.js
is not served on the supplied path prefix.Exceptions (if any)
No response
.NET Version
8.0.1
Anything else?
No response
The text was updated successfully, but these errors were encountered: