analog icon indicating copy to clipboard operation
analog copied to clipboard

[FEAT]: Add support for HMR in development mode

Open brandonroberts opened this issue 1 year ago • 1 comments

Vite uses HMR to enable refreshing the app without reloading the whole page. Vite uses HMR closest to the code that accepts HMR.

Angular has some support for this but not as granular as the root app needs to be destroyed and recreated for this to work.

External styles outside of component templates and HTML work as intended.

Prior art: https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/build_angular/src/webpack/plugins/hmr/hmr-accept.ts

brandonroberts avatar Jul 27 '22 23:07 brandonroberts

Plugin as-is when used in Vite environment does a flash on each HMR reload. Need to investigate this so it appears native.

brandonroberts avatar Aug 23 '22 00:08 brandonroberts

Do you think it is possible sometime soon? 😅

omerman avatar Sep 02 '23 20:09 omerman

Will revisit this when better HMR support lands in Angular

brandonroberts avatar Mar 27 '24 03:03 brandonroberts