Hot updates should ignore broken builds
See original GitHub issueIf the build is broken, is there ever any reason to apply a hot update?
(Note: this issue is pretty much the same as #1105 but I understand the problem better now and there was no discussion there so let’s try formulating it again.)
I understand that NoErrorsPlugin
exists to help alleviate this but it has a downside of serving the last successful bundle which can really trip up people who aren’t familiar with this gotcha who refresh, see their app “working”, don’t notice there is an error in console, and can’t figure out why none of their new code has any effect. So I would prefer to avoid NoErrorsPlugin
.
If I don’t use NoErrorsPlugin
then hot reloading just breaks at the first bundle error:


After fixing the error, the update is just stuck:

The main problem, as I see it, is that hot-update.json
points to the hash of a broken build. Does this ever make sense? It’s not like you can cleanly apply it anyway. Can we just avoid pointing hot-update.json
at broken builds?
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (7 by maintainers)
Please can this fix get backported into Webpack v1? It looks like the commit went into v2.1.0-beta.x. Without this, Webpack dev server + the React Hot Reloader becomes quite painful to use!
ok I tried to fix it… at least for ES6 Modules.