Sponsor webpack and get apparel from the official shop! All proceeds go to our open collective!
Enables Hot Module Replacement, otherwise known as HMR.
HMR should never be used in production.
Enabling HMR is easy and in most cases no options are necessary.
new webpack.HotModuleReplacementPlugin({
// Options...
});
The following options are accepted:
multiStep
(boolean): If true
, the plugin will build in two steps -- first compiling the hot update chunks, and then the remaining normal assets.fullBuildTimeout
(number): The delay between the two steps when multiStep
is enabled.requestTimeout
(number): The timeout used for manifest download (since webpack 3.0.0)These options are experimental and may be deprecated. As mentioned above, they are typically not necessary and including a
new webpack.HotModuleReplacementPlugin()
is enough.