The generated template for a blazor wasm hosted app has its base URL starting at '/' ( ie, https://localhost:5001/ for local development or https://www.domain-name.xyz/ when deployed.) I need this base URL to be '/app' instead, ie, (https://localhost:5001/app) or (https://www.domain-name.xyz/app).
The documentation (here and here) says that I have to change the base URL in the <base /> tag in index.html:
<base href="/app/" />
and use the command line argument --pathbase when developing locally:
dotnet run --pathbase=/app
I did that and changed nothing else to the template. This however does not work for me. I just get a 404 not found for all the files of the app.
This issue here says that I also need to change where the Blazor files are exposed by passing '/app' to UseBlazorFrameworkFiles:
app.UseBlazorFrameworkFiles("/app")
This also does not solve my problem.
Can anyone provide a step by step guidance to how to achieve this and that is guaranteed to work.