Ionic 5 - Angular 11 and Hot Module Replacement

Yup. This is happening. So, just be care, it may still be too experimental :slight_smile:

image

Any solution for this in 2022?

I have an angular 10 project that I opened at work. after a while, when I saw that HMR added to angular 11 I upgraded the project by trying to work with HMR. Since it didn’t, I opened a brand new angular project. checked that HMR working. I moved all components, services, modules, styles (without node folder of course) and launched it using ng serve --hmr and it failed to work again. the page is being refreshed.

I am on this 3 days. Any idea will be appreciated?. .

This is what I did to get HMR running on my setup.

Hacky, but working

Angular HMR feature is not perfect.

I faced that whole app was refreshed beacause of lazy module.

Hello Sir,

I have faced a issue. I can’t run my project. Please me, how can I solve my problem?
I have shared my issue. Please check it.

PS D:\Office Project\UCMMobile> ionic serve

npm.cmd run ionic:serve – --host=localhost --port=8100 --project=app
[npm] > newucm@0.0.1 ionic:serve
[npm] > ionic-app-scripts serve ā€œā€“host=localhostā€ ā€œā€“port=8100ā€ ā€œā€“project=appā€
[npm] ā€˜ionic-app-scripts’ is not recognized as an internal or external command,
[npm] operable program or batch file.

[ERROR] npm has unexpectedly closed (exit code 1).

    The Ionic CLI will exit. Please check any output above for error details.

Thanks