speed-measure-webpack-plugin
speed-measure-webpack-plugin copied to clipboard
Using SpeedMeasurePlugin with HMR seems to somehow break the HotModuleReplacementPlugin
Here was my configuration:
const devPlugins = [
new webpack.HotModuleReplacementPlugin(),
new ReactRefreshWebpackPlugin({
overlay: {
sockIntegration: 'whm',
},
}),
new SpeedMeasurePlugin();
module.exports = smp.wrap({
entry: {
main: isDev ? ['webpack-hot-middleware/client', './src/index.jsx'] : ['./src/index.jsx'],
},
...
Inside my browser I get an error from the webpack-hot-middleware/client saying Hot Module Loading has been disabled because it can't find module.hot on the javascript files. If I set disable to true for the SpeedMeasurePlugin, the Hot Module Loading starts working again
Here's the browser error
process-update.js?881f:10 Uncaught Error: [HMR] Hot Module Replacement is disabled.
at eval (process-update.js?881f:10)
at Object.82100 (vendor.webpack-hot-middleware.js:59)
at __webpack_require__ (main.js:2655)
at eval (client.js?0e05:233)
at Object.93950 (vendor.webpack-hot-middleware.js:27)
at __webpack_require__ (main.js:2655)
at checkDeferredModulesImpl (main.js:2969)
at Function.__webpack_require__.x (main.js:2982)
at main.js:2988
at main.js:2989
ok I wasa able to reproduce
me too, seems like the compilation.compiler is proxyed
compilation.compiler !== compiler
Seconded - I found this issue after having to get the debugger out on webpack... once I saw the proxy was in SMP, it all fell into place.
Doh.