-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HMR stopped work after webpack upgrade from 3 to 4 #292
Comments
Same here. I'm not able to make it work :( |
Also getting same error. Using with
Looks like something similar is occurring with Webpack Node Externals: Here is a link to my code: Code is in |
whats the solution ?? |
if I inject var hotClient = require('webpack-hot-middleware/client' + __resourceQuery)
hotClient.subscribe(function (event) {
if (event.action === 'reload') {
window.location.reload()
}
}) There was not error and page reloaded, but HMR does not work. |
Was this ever solved? |
Just wanted to mention that I got an error related to the "__resourceQuery" being empty for webpack-dev-server, and eventually realized it was due to an update in webpack-dev-server that makes it automatically require the "webpack-dev-server" module when you call I don't have time to go into it all, but here is the commit where I solved my issue: Venryx/mobx-devtools-advanced@d1fdb0d#diff-2c81437e455a833c25e31879ed05c465 A (brief) explanation of the change seems to be here: webpack/webpack-dev-server#1802 (comment) |
Closing due to inactivity. Please test with latest version and feel free to reopen if still regressions. Thanks! |
HMR was broken for me after webpack upgrade from 3 to 4. Here small repo with reproduction of behaviour (I'v got [HMR] Nothing hot updated. message) https://github.com/Yizhachok/project-hmr
Here I have webpack configuration:
https://github.com/Yizhachok/project-hmr/tree/master/dev/client/webpack
Here I subscribe to HMR events:
https://github.com/Yizhachok/project-hmr/blob/master/client/environments/environment.hmr.ts#L36
console.log('Here');
never firedThe text was updated successfully, but these errors were encountered: