angularlivereload

stop auto page reload and only rebuild ui in angular


I need to update only scss compilation part without reloading the entire page when I save any scss file.

I have tried to search but not getting any idea how to do this.

I tried passing --live-reload false option inside ng serve that angular provides as a default but this does not refresh anything.

So any help will be much appreciated. Thanks in advance.


Solution

  • I think you might be looking for 'Hot Module Replacement':

    https://dev.to/iamscottcab/using-hot-module-replacement-in-angular-11-mji

    I've had some luck using it in the past but rarely use it myself.