March 19, 2025
We are excited to announce the official release of Rsdoctor 1.0!
After a year of development and testing, we are proud to introduce Rsdoctor 1.0 — a build analyzer tailored for the Rspack ecosystem and fully compatible with the webpack 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.
In the field of build analysis, the community already has some mature tools, such as webpack-bundle-analyzer for visualizing bundles, and Statoscope for comprehensive resource analysis. In addition, speed-measure-webpack-plugin can be used to analyze the execution time of plugins and loaders, and locate build performance bottlenecks.
However, these tools still have some shortcomings, such as lack of detailed display of build details, lack of comprehensive build problem analysis capabilities, incompatibility with Rspack, and lack of build warning scanning capabilities.
In summary, community tools have the following areas for improvement:
Based on the above situation, we decided to develop a build analyzer focused on the Rspack ecosystem — Rsdoctor.
We designed an intuitive user interface for Rsdoctor, and Rsdoctor extends the loader profiling capability by combining the advantages of multiple tools to more deeply analyze the loader behavior in the compilation phase, built-in the scanning and detection rules for artifacts and compilation, and supports user custom rules.
Rsdoctor not only supports Rspack and webpack, but also supports all tools and frameworks based on Rspack or webpack, such as: Docusaurus, Rspeedy (Lynx), Storybook, Next.js, Nuxt, Re.Pack, Modern.js, Rsbuild, Rspress and Rslib.
Rsdoctor can be used to:
Rsdoctor has been widely used within ByteDance, helping developers efficiently analyze and solve various problems in the build process.
Since its open source in 2024, Rsdoctor's npm weekly downloads has exceeded 100k. In the community, Rsdoctor has been integrated into frameworks such as Docusaurus and Lynx. In addition, Rsdoctor has also been adopted by large projects such as Sentry, NocoBase and Grafana.
In the future, Rsdoctor will continue to provide first-class support for all tools in the Rstack (Rspack stack
abbreviation) ecosystem:
Rsdoctor offers a rich set of features, detailed content can be found in the Feature Navigation. Here are some typical use cases that demonstrate how Rsdoctor effectively solves common build problems:
During the build process, if you find that the compilation speed is too slow, you can use the Loader Timeline to view the time consumption of loader execution, and understand the compilation time consumption of each file by each loader. This way, you can find loaders with excessive time consumption.
During the build, there may be problems where the outputs do not match expectations, such as runtime exceptions or style errors. The Loader Details page of Rsdoctor can help you examine the changes made by the loader to a specific file before and after compilation.
We can use the Bundle Analysis page to look at the modules tree of a particular artifact to see what modules the chunk contains, and then use the splitChunks configuration of Rspack to split the chunks appropriately.
When a certain version is launched, if the performance of the online page deteriorates due to the increase in the size of the artifact, you can use the Bundle Diff feature of Rsdoctor to compare the details of the bundles of two commits, as well as the changes in the npm packages they depend on.
During the build process, if you want to know why a certain module file is bundled into the artifact, you can click on the Module Graph
icon behind the module in the Modules tree on the Artifact Analysis page to view the upstream dependency relationship of the module.
In version 1.0, we have comprehensively optimized the user interface of Rsdoctor, making it more clear, elegant, and easy to navigate. The new design is dedicated to improving the user experience, making information display more intuitive and efficient.
In large projects, enabling Rsdoctor can increase the overall build time. To solve this problem, we rewrote the time-consuming data processing logic in Rsdoctor in Rust, and integrated it into Rspack.
This optimization effectively improves the build analysis performance of Rsdoctor, and reduces the overall analysis time by more than 20%. In the future, we will continue to native more modules to further improve the analysis efficiency.
This optimization can be enabled through the enableNativePlugin option:
Bundle Size
page, we have added a module search function. Users can quickly locate and view the Assets
where the module is located by entering the module name, making it more convenient to analyze the reference relationship and size of the module. Detailschunks
. These duplicate packages may cause redundant code in the build.reportCodeType
and reportDir
configuration items in the plugin configuration have been moved to output.Welcome to give a star 🌟 to the Rsdoctor GitHub repository.
Finally, thank you to all the developers who have contributed to Rsdoctor ❤️:
@9aoy、@bin1357、@cairon666、@cclap2020、@charpeni、@chenjiahan、@ChuHoMan、@cnryb、@Gehbt、@gezhicui、@HigherOrderLogic、@iamleniac、@inottn、@jkzing、@KyrieLii、@kwonoj、@LingyuCoder、@nanianlisao、@nhducit、@NickBolles、@nyqykk、@puppet-666、@SoonIter、@sudhakar-s、@Timeless0911、@tinywaves、@trueLoving、@wChenonly、@zllkjc。