> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# dev.hmr

- **Type:** `boolean`
- **Default:** `true`

Whether to enable Hot Module Replacement.

Refer to [Hot module replacement](/guide/advanced/hmr.md) for more information.

> You can configure the HMR behavior of the client code via [dev.client](/config/dev/client.md).

## Disabling HMR

When `dev.hmr` is set to `false`, HMR and react-refresh will be disabled and Rsbuild will automatically fall back to [dev.liveReload](/config/dev/live-reload.md).

```ts title="rsbuild.config.ts"
export default {
  dev: {
    hmr: false,
  },
};
```
