mirkonasato / ionic2-webpack2-starter

Ionic 2 starter project based on Webpack 2
MIT License
25 stars 8 forks source link

Support for Hot Module Replacement (HMR) #1

Open mirkonasato opened 7 years ago

mirkonasato commented 7 years ago

Webpack can do Hot Module Replacement, but to work with Angular it probably needs something extra; see e.g. the angular2-hmr module.

The big advantage should be that if you're editing a page and change something the automatic refresh should apply the change directly to that page, instead of reloading the whole app from the root page.

fmoessle commented 7 years ago

I am working on implementing @angularclass/hmr-loader and @angularclass/hmr. I will give you an update :)

Most guys are combining the hmr with an appState, but for the sake of simplicity i would not add this, so people using this starter are not forced to use ngrx/store (although it is amazing).

fmoessle commented 7 years ago

I am done, works fine.

mirkonasato commented 7 years ago

Great. Is your code available somewhere?

fmoessle commented 7 years ago

https://github.com/fmoessle/ionic2-webpack2-starter/commit/f1a3a889ff297d687a5b5f8273696ad5a0ba06ae