-
Notifications
You must be signed in to change notification settings - Fork 240
Fix webpack v4 issue where webpackHotUpdate is not defined on hard reload #566
Conversation
…d on hard reload of the page
|
Nice catch! Thank you |
|
Even with this fix I still see this error sometimes, its kinda intermittent |
|
Proof it still happens: https://youtu.be/kWI6YPANzVA?t=1m31s |
|
@williamoliveira any idea what situations are causing it? I haven't seen the error since adding this in yet. The issue on |
|
If this issue is together with Webpack 4, this may be due to After updating to Webpack 4 it started to overwrite index file path in So to fix this issue you need to add the following in let webpackConfig = {
// ...
// Bundle output configuration.
output: {
// ...
hotUpdateChunkFilename: '[hash].hot-update.js', // use for AssetsPlugin to filter out hot updates
},
// ...
};In future, it seems to be better to built-in use |
|
@SleepWalker thank you very much, that did it doc says the default value for this setting is |
|
@SleepWalker or @williamoliveira Want to make a PR for it? If not, I can do it later. |
|
Awesome @SleepWalker - I am all for dropping plugins! 👍 If we can take benefit of core Webpack functionality over existing plugins I would highly recommend we migrate towards this. |
|
@declanelcocks I've opened the PR. I left
@ctrlplusb I will look into this, but not sure when. This may take some weeks. |
|
great @SleepWalker 👍 |
See here for related issue thread on webpack.
TLDR:
npm run developwebpackHotUpdate is not definederror in consoleSeems that in webpack v3,
new webpack.HotModuleReplacementPlugin(),works fine, but in v4 we need to add{ multiStep: true }