Quick start
This document will explain how to access the Rsdoctor ability.
Step 1: install dependencies
Rspack projects
For projects based on Rspack, such as Rsbuild or Rslib, install the following dependencies:
Step 2: register plugin
After the dependency installation, you need to integrate the Rsdoctor plugin into your project. Below are some examples of common tools and frameworks:
Rspack
Initialize the RsdoctorRspackPlugin in the plugins of rspack.config.js:
- Options: The plugin provides some configurations, please refer to Options.
Rsbuild
Rsbuild has built-in support for Rsdoctor, so you don't need to manually register plugins. See Rsbuild - Use Rsdoctor for more details.
Modern.js
Initialize the plugin in the tools.rspack of modern.config.ts:
- Options: The plugin provides some configurations, please refer to Options.
Next.js
Step 1: Register the Rsdoctor plugin
Initialize the RsdoctorRspackPlugin plugin in the Rspack Config of next.config.ts.
- Options: The plugin provides some configuration options, please refer to Options.
Step 2: Execute build
Execute the build command, Rsdoctor will generate the corresponding report data in the local repository artifacts.
Step 3: Open the report
After installing @rsdoctor/cli, add the following scripts commands to package.json, executing client:rsd or server:rsd can open the report of the corresponding builder:
📢 Note for Next.js
After Next.js finishes executing the build command, it will terminate the terminal service, causing the report page server run by Rsdoctor during the build process to close. To solve this problem, you can use @rsdoctor/cli to reopen the report page without re-executing the build operation. The specific method is shown in the third step or by locally executing the rsdoctor command:
For example, if Rsdoctor's build output is located at the path .next/server/chunks/.rsdoctor/manifest.json, you can open the report page by executing the following command:
Vue project
Initialize the @rsdoctor/rspack-plugin plugin in the configuration file. Here is an example using rsbuild:
- Options: The plugin provides some configurations, please refer to Options.
Step 3: Execute build
Now, you can run the build command in the project. After the build is complete, Rsdoctor will automatically open the analysis page of this build.
The Rsdoctor plugin provides some configurations, please refer to Options.

