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.
How to use
In an Rspack project, you can enable Rsdoctor by following these steps:
- Install the
@rsdoctor/rspack-pluginplugin:
- Register the
RsdoctorRspackPluginplugin in the plugins option of Rspack:
- Add the
RSDOCTOR=truevariable before the build command:
As Windows does not support the above usage, you can also use cross-env to set environment variables. This ensures compatibility across different systems:
Rsdoctor will open the build analysis page after the build is complete. For complete features, please refer to Rsdoctor documentation.
Configure Rsdoctor
See the Options documentation of Rsdoctor to configure the options of the RsdoctorRspackPlugin.
More features
See the Rsdoctor features to learn about all the features of Rsdoctor.

