HotModuleReplacementPlugin

Enables Hot Module Replacement.

WARNING

HMR should never be used in production.

Enabling HMR is straightforward and in most cases no options are necessary.

new rspack.HotModuleReplacementPlugin({
  // Options...
});

Options

strictModuleErrorHandling

Handle error in module loading as per ECMAScript Modules spec at a performance cost.

  • Type: boolean
  • Default: false