Webpack dev middleware react hot reload too slow Webpack dev middleware react hot reload too slow reactjs reactjs

Webpack dev middleware react hot reload too slow


Consider switching polling to false in your middleware. I've found that polling can be CPU-intensive.

In you webpack config, you might also want to try adding devtool: false to avoid creating a source map.


Pro Tip: Change your mode in webpack.config.js to development. It defaults to production if you leave this property out, which means it does slow production stuff and makes your hot reloading suck.

module.exports = {    mode: 'development'};


You should enable caching:

    ...    plugins: [        new webpack.optimize.OccurenceOrderPlugin(),        new webpack.HotModuleReplacementPlugin(),        new webpack.NoErrorsPlugin()    ],    cache: true};