4

I'm trying to create a new app with the new spa-templates from Microsoft, but HMR (Hot Module Replacement) is not working. I tried this.

. Install the SPA templates:

    dotnet new --install Microsoft.DotNet.Web.Spa.ProjectTemplates::2.0.0-rc2-final

. Created a new application using command line

    dotnet new angular -o MyApp

Ran command (working on linux):

    export SET ASPNETCORE_Environment=Development 

.In the ClientApp folder:

    npm install

.Back in the main folder:

    dotnet run

I was able to see the app running without any problems at http://localhost:5000, but when I modify any .ts file or .html in the angular app folder no changes are reflected or sent to the browser. How I configure HMR in this new angular/cli based template.

I also tried something like this: https://github.com/angular/angular-cli/wiki/stories-configure-hmr

Or this. https://medium.com/@beeman/tutorial-enable-hmr-in-angular-cli-apps-1b0d13b80130

PD.: With VSCode happens the same, serveral browsers tested, my angular/cli, npm, nodejs, .netcore are up to date

Cœur
  • 37,241
  • 25
  • 195
  • 267
beetle
  • 41
  • 2

0 Answers0