Rsdoctor is a build analysis tool that supports both Webpack and Rspack. In Modern.js, we recommend using Rsdoctor to diagnose and analyze the build process and build outputs.
Depending on whether your project uses Rspack or Webpack, choose the corresponding plugin installation.
In modern.config.ts
, you can register the Rspack or Webpack plugin via tools.bundlerChain
. Refer to the example below:
The above code is an example of using Rspack. If you are using Webpack, please switch the plugin accordingly.
You can execute the build command within your project. After the build is complete, Rsdoctor will automatically open the analysis page for the build.
For more information, please refer to the Rsdoctor Website.