dev.hmr

  • Type: boolean
  • Default: true

Whether to enable Hot Module Replacement.

Please refer to Hot Module Replacement for more information.

You can configure the HMR behavior of the client code via dev.client.

Disabling HMR

If dev.hmr is set to false, HMR and react-refresh will be disabled and Rsbuild will automatically fall back to dev.liveReload.

export default {
  dev: {
    hmr: false,
  },
};
ON THIS PAGE