You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
I created a project using the latest dotnet new angular template and replaced the ClientApp folder with an Aurelia app created using the Aurelia CLI.
The command au new
was ran inside the project folder to create a new ClientApp folder, the following options were used:
Name: ClientApp
Platform: Web
Bundler: Webpack
Startup.cs was modified to use spa.UseProxyToSpaDevelopmentServer: //spa.UseAngularCliServer(npmScript: "start"); spa.UseProxyToSpaDevelopmentServer(baseUri: "http://localhost:8080");
When i run both au run --watch
and dotnet run
it works fine, i can edit a file in the Aurelia app and the browser refreshes automatically using a full page refresh.
However if i run au run --watch --hmr
instead, the auto refresh no longer works, but still works if i visit the Aurelia app directly via http://localhost:8080 (still refreshes the whole page as there is only 1 module in the au new template) it just no longer works from the dotnet host on http://localhost:5000 or https://localhost:5001
I then checked to see if "Hot Module Replacement" worked in the Angular app which was created by the template by enabling it using the following guide: https://github.com/angular/angular-cli/wiki/1-x-stories-configure-hmr
and edited startup.cs to use the angular url: spa.UseProxyToSpaDevelopmentServer(baseUri: "http://localhost:4200");
It works fine, i can edit a file in the angular project and see that the page updates without a full page refresh.
I have not read enough about HMR to understand how it does what it does, but as both ClientApps are using Webpack hmr, i would have expected it to also work in Aurelia through the spa proxy.