Hot module reloading broken since 2.2.3 using default options
woutervanvliet opened this issue · 4 comments
I just updated to 2.2.3 and noticed my HMR no longer working. It's configured by:
adding the following to the entry:
'webpack/hot/poll?1000'
and
new webpack.HotModuleReplacementPlugin(),
to my plugins.
I then swap out my server module like so:
if (module.hot) {
module.hot.accept('./server', () => {
server.removeListener('request', currentApp);
server.on('request', app);
currentApp = app;
});
}
Which worked in 2.2.1. But now I an see webpack generating some hot updates, and nothing else. Trying to call the server now results in connection refused - probably because it got shut down when it got kill
ed.
When I disable the new signal, HMR works again.
@tikotzky thoughts? I assumed that the polling would continue working, and the USR2 signal would be ignored…
@woutervanvliet in the meantime you can switch to 'webpack/hot/signal'
which should just work…
I would think it would be ignored as well.
I tested by me and pretty sure it was working...
For now you can switch to use webpack/hot/signal
instead of webpack/hot/poll?1000
or you can set signal: false
in the config for the start server plugin.
Both options work indeed. Loving webpack/hot/signal
- listening is so much better than polling ;-).
imho; this issue can be solved by a documentation update
also imho; this change should probably not have been a patch update, as it introduced a breaking change - at least in my setup.
Making it default to false in the next patch release, I hope the npm build works :-/