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

# Using Rsdoctor

Rsdoctor is a Rspack build analysis tool. In Modern.js, we recommend using Rsdoctor to diagnose and analyze the build process and build outputs.

Modern.js does not enable Rsdoctor by default. Configure `performance.rsdoctor` when you want to run Rsdoctor for a build.

## Execute Build

```ts title="modern.config.ts"
export default defineConfig({
  performance: {
    rsdoctor: true,
  },
});
```

```bash
npm run build
```

## Disable Rsdoctor

If you want to disable Rsdoctor after enabling it in shared config:

```ts title="modern.config.ts"
export default defineConfig({
  performance: {
    rsdoctor: false,
  },
});
```

You can also use object form:

```ts title="modern.config.ts"
export default defineConfig({
  performance: {
    rsdoctor: {
      enabled: true,
    },
  },
});
```

## Related Docs

For more information, please refer to the [Rsdoctor Website](https://rsdoctor.rs/).
