docusaurus/website/docs/api/plugins/plugin-rsdoctor.mdx
Sébastien Lorber 24716787d3
Some checks are pending
Argos CI / take-screenshots (push) Waiting to run
Build Hash Router / Build Hash Router (push) Waiting to run
Canary Release / Publish Canary (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
Continuous Releases / Continuous Releases (push) Waiting to run
E2E Tests / E2E — Yarn v1 (18.0) (push) Waiting to run
E2E Tests / E2E — Yarn v1 (20) (push) Waiting to run
E2E Tests / E2E — Yarn v1 (22) (push) Waiting to run
E2E Tests / E2E — Yarn Berry (node-modules, -s) (push) Waiting to run
E2E Tests / E2E — Yarn Berry (node-modules, -st) (push) Waiting to run
E2E Tests / E2E — Yarn Berry (pnp, -s) (push) Waiting to run
E2E Tests / E2E — Yarn Berry (pnp, -st) (push) Waiting to run
E2E Tests / E2E — npm (push) Waiting to run
E2E Tests / E2E — pnpm (push) Waiting to run
feat: new Rsdoctor official plugin (#10588)
2024-10-17 17:20:06 +02:00

58 lines
1.1 KiB
Plaintext

---
sidebar_position: 7
slug: /api/plugins/@docusaurus/plugin-rsdoctor
---
# 📦 plugin-rsdoctor
import APITable from '@site/src/components/APITable';
A [Rsdoctor](https://rsdoctor.dev/) plugin can help you troubleshoot the bundling phase of your Docusaurus site, supporting both Webpack and Rspack.
:::tip
Use it to figure out which plugin or loader is slowing down the bundler, and focus your efforts on optimizing the bottleneck.
:::
## Installation {#installation}
```bash npm2yarn
npm install --save @docusaurus/plugin-rsdoctor
```
## Configuration {#configuration}
Accepted fields:
```mdx-code-block
<APITable>
```
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `rsdoctorOptions` | `object` | `{}` | The [Rsdoctor bundler plugin options](https://rsdoctor.dev/config/options/options), forwarded as is |
```mdx-code-block
</APITable>
```
### Example configuration {#ex-config}
You can configure this plugin through plugin options.
```js title="docusaurus.config.js"
export default {
plugins: [
[
'rsdoctor',
{
rsdoctorOptions: {
mode: 'lite',
},
},
],
],
};
```