Use Rsdoctor
Rsdoctor is a build analyzer tailored for the Rspack ecosystem.
Rsdoctor is committed to being a one-stop, intelligent build analyzer that makes the build process transparent, predictable, and optimizable through visualization and smart analysis, helping development teams precisely identify bottlenecks, optimize performance, and improve engineering quality.
If you need to debug the build outputs or build process, you can use Rsdoctor for troubleshooting.
Requirements
Rsdoctor 2.0 requires Node.js ^20.19.0 || >=22.12.0 and Rspack 2.0 or later. If your project uses Rspack 1.x or webpack, use Rsdoctor 1.x instead.
How to use
- Install
@rsdoctor/core:
- Register
RsdoctorRspackPluginin the Rspack plugins option. Rsdoctor 2.0 packages are ESM-only, so use an ESM config and import:
- Set
RSDOCTOR=truewhen running Rspack:
As Windows does not support the above usage, you can also use cross-env to set environment variables. This ensures compatibility across different systems:
After the build, Rsdoctor opens the analysis page. See the Rsdoctor 2.0 quick start for more details.
Upgrading from Rsdoctor 1.x
Replace @rsdoctor/rspack-plugin with @rsdoctor/core and update the import shown above. Remove experiments.enableNativePlugin if configured; the Rspack native plugin is always enabled in Rsdoctor 2.0. For other configuration changes, see the Rsdoctor 2.0 migration guide.

