Search code examples
angularnpmwebpackangular-cliwebpack-hmr

Hot module replacement in angular 8


I am currently starting a new angular project, and I would like to implement HMR (Hot Module Replacement).

I have done each and every step described in the tutorial, but I get the following errors:

Using the latest angular version. Fresh project setup.

enter image description here enter image description here


Solution

  • NOTE: I have found the most relevant tutorial (in my opinion) , because I also swapped my code snippets with the ones described in it, so please use this one for reference.

    The problem with the Project does not exist. error was that I have forgot to add the local name (directory name) of the project in angular.json

    enter image description here

    Must become:

    enter image description here

    And, voila:

    enter image description here