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.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With