Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

angular configure hot reload / live reload for speed

I'm using Angular 5.

The hot reload takes about 8 secs which is reasonable (not great though) but is there any way to configure it so I can tweak it to make it faster?

Concerned it will get even slower as the app grows. Thanks.

like image 686
danday74 Avatar asked Jun 09 '18 02:06

danday74


People also ask

Does angular have hot reload?

In Angular 11 also they have done all these great stuff but this time they also added HMR (Hot Module Replacement) feature which will now help everyone to save lots of development time. This feature you can utilized using angular cli only.

What is HMR in Angular?

Hot Module Replacement (HMR), often referred to as Hot Module Reloading, is a once old now brought back feature in Angular v11. The arrival of Ivy has allowed us to do so many many things, not the least of which is use HMR.

What is angular live reload?

Angular (and really any of the major JavaScript UI frameworks that integrate with the WebPack Dev Server) provides a built-in Live Reload Web server that makes it quick and easy to see UI changes updated in the browser as soon as you make a change to your code, HTML or CSS content.

What is hot code reload?

The hotCodeReloading option enables special compilation mode where changes in the code can be applied automatically to a running program. The code reloading happens at the granularity of an individual module.


1 Answers

Try to compile with Ahead-of-Time option

Angular Doc: With AOT, the browser downloads a pre-compiled version of the application. The browser loads executable code so it can render the application immediately, without waiting to compile the app first.

like image 125
aureluss Avatar answered Sep 17 '22 17:09

aureluss