Enables Hot Module Replacement, otherwise known as HMR.
Enabling HMR is straightforward and in most cases no options are necessary.
new webpack.HotModuleReplacementPlugin({
// Options...
});
Webpack 5 has been officially released. Read our announcement. Not ready yet? Read webpack 4 documentation here.