Hot Module Replacement


#1

Hi,

how does Ionic 2 support HMR (Hot Module Replacement)?
The live-reload is nice, only gets you so far that it starts at the first page .


#2

ionic routing is independent of browser history so you will start at the beginning because you do not know anything about your last history / navigation stack.

And it is mobile development and you have to reload the whole page to get the changes


#3

@geoHeil

This is something we’ve talked about before and have toyed around with the idea of providing this. We don’t have a whole lot of answers for this right now. There’s a lot of tooling questions that still need to be worked out as time goes on.


#4

Since app-scripts is built on Webpack these days, perhaps HMR is something that could be implemented. Any exploration been done here?


#5

Hey @bholben, we had looked it at one point.
There’s a lot of overhead involved in setting up HMR, and it really doesn’t grok with how app-scripts handles build.
All in all, there wasn’t a bit enough return to make adding it worth it really.


#6

Is this available in Ionic 3? Or planned to be? It’s actually super useful IMO in dev-speed. That way not every single tiniest little change needs to be live-reloaded (taking 10+ seconds or so each time). Thoughts?