<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Rsdoctor Releases</title>
        <link>https://rsdoctor.rs</link>
        <description>A one-stop build analyzer for Rspack and webpack.</description>
        <lastBuildDate>Mon, 11 May 2026 09:16:39 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <copyright>Copyright © 2024 ByteDance</copyright>
        <item>
            <title><![CDATA[Announcing Rsdoctor 1.2]]></title>
            <link>https://rsdoctor.rs/blog/release/release-note-1_2</link>
            <guid isPermaLink="false">/blog/release/release-note-1_2</guid>
            <pubDate>Fri, 01 Aug 2025 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<!--$--><p><em>August 2025</em></p>
<h1 class="rp-toc-include" id="announcing-rsdoctor-12"><a href="#announcing-rsdoctor-12" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Announcing Rsdoctor 1.2<!-- --> </h1><div class="rp-not-doc rp-llms-container"><button class="rp-not-doc rp-llms-button rp-llms-copy-button"><div class="rp-llms-copy-button__icon-wrapper"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-llms-copy-button__icon-success"><path fill="currentColor" d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-llms-copy-button__icon-copy"><path fill="currentColor" d="M20 8v12H8V8zm0-2H8a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2"></path><path fill="currentColor" d="M4 16H2V4a2 2 0 0 1 2-2h12v2H4Z"></path></svg></div><span>Copy Markdown</span></button><button class="rp-llms-button rp-llms-view-options__trigger "><svg width="1em" height="1em" viewBox="0 0 32 32" class="rp-llms-view-options__arrow "><path fill="currentColor" d="M16 22 6 12l1.4-1.4 8.6 8.6 8.6-8.6L26 12z"></path></svg></button></div>
<p>Rsdoctor 1.2 has been released! 🎉</p>
<ul>
<li><strong>Deep concatenated module analysis</strong>: Added the ability to analyze the size of concatenated modules, helping developers more accurately identify the actual build size after Tree Shaking.</li>
<li><strong>Bundle Size Analysis with Gzip Support</strong>: Bundle size analysis now displays the size after gzip compression, making it easier for developers to understand the real size of production assets.</li>
<li><strong>Enhanced Treemap Visualization</strong>: Introduced and improved the Treemap (rectangle tree map) feature, allowing developers to gain more intuitive insights into bundle composition and resource distribution.</li>
<li><strong>Rsdoctor MCP</strong>: Rsdoctor MCP is an LLM-powered build analysis tool that helps developers quickly obtain build analysis results through Q&amp;A interactions.</li>
</ul>
<h2 class="rp-toc-include" id="deep-concatenated-module-analysis"><a href="#deep-concatenated-module-analysis" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Deep concatenated module analysis</h2>
<p>During the Rspack build process, certain modules are hoisted or aggregated into a single closure, forming a concatenated module to improve browser execution efficiency and reduce artifact size. Previously, Rsdoctor could not further decompose and analyze the internal structure of these concatenated modules, as they cannot be further split through AST parsing.</p>
<p><strong>Rsdoctor 1.2</strong> supports the ability to analyze concatenated module sizes, helping developers accurately understand the actual build size of sub-modules (aggregated modules) after <strong>tree shaking and compression</strong>, facilitating analysis of how concatenated modules affect final bundle size and optimization of code splitting strategies.</p>
<p>Additionally, <strong>the Rsdoctor plugin built into Rspack (&gt;=1.4.11)</strong> has enhanced source map capabilities, allowing seamless analysis of concatenated modules <strong>without enabling source maps</strong>. <strong>However, Webpack projects still require source maps to be enabled.</strong></p>
<blockquote>
<p><a href="/guide/usage/bundle-size#support-for-concatenated-module-analysis" class="rp-link">View usage details</a></p>
</blockquote>
<video src="https://assets.rspack.rs/others/assets/rsdoctor/concatenate.mp4" style="width:100%;height:auto;max-height:50vh;object-fit:cover;display:block" autoplay="" muted="" controls="" loop="" playsinline=""></video>
<h2 class="rp-toc-include" id="enhanced-treemap-visualization"><a href="#enhanced-treemap-visualization" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Enhanced treemap visualization</h2>
<p>Previously, Rsdoctor&#x27;s Treemap view was implemented based on webpack-bundle-analyzer, which required Rsdoctor to go through webpack-bundle-analyzer&#x27;s processing pipeline again after completing its analysis, reducing overall analysis efficiency. Additionally, Treemap page loading was slow, while Treemap is precisely the most commonly used visualization view for developers when analyzing bundles.</p>
<p><strong>Rsdoctor 1.2</strong> introduces a new classic Treemap artifact analysis view, helping developers more intuitively visualize and analyze bundle composition, Assets, and Modules proportions. You can also search for module resources, click on the module resource, and zoom in to the module area.</p>
<blockquote>
<p><a href="/guide/usage/bundle-size#bundle-treemap-graph" class="rp-link">View usage details</a></p>
</blockquote>
<img src="https://assets.rspack.rs/others/assets/rsdoctor/treemap.gif" width="500px" style="margin:auto"/>
<h2 class="rp-toc-include" id="support-gzip-size"><a href="#support-gzip-size" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Support gzip size</h2>
<p>To more accurately reflect production environment size performance, Rsdoctor has added support for analyzing gzip compressed sizes, which can be viewed on the Bundle Size page and TreeMap page, as shown below:</p>
<img src="https://assets.rspack.rs/others/assets/rsdoctor/treemap-gzip.png" width="500px" style="margin:auto"/>
<p>This shows a comparison between original size and gzip compressed size, providing more accurate reference data for production environment optimization.</p>
<h2 class="rp-toc-include" id="rsdoctor-mcp"><a href="#rsdoctor-mcp" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Rsdoctor MCP</h2>
<p>Rsdoctor provides rich build analysis data, but developers need to spend time on page interactions and learning costs to perform build analysis and optimization. Therefore, we hope to leverage LLM for more intelligent build analysis to help users obtain analysis results more quickly.</p>
<p>Rsdoctor v1.1 introduced MCP support, which is based on <strong>Model Context Protocol (MCP)</strong> protocol, combining Rsdoctor&#x27;s analysis capabilities with LLM&#x27;s intelligent understanding abilities. Through natural language Q&amp;A interactions, developers can quickly obtain build analysis results without needing to deeply understand complex analysis interfaces and data structures. Its main features include obtaining artifact information, dependency analysis, optimization suggestions, compilation performance, and tree shaking analysis among other core analytical capabilities.</p>
<p>Rsdoctor MCP supports natural language Q&amp;A - you can directly ask questions like &quot;Which packages have the largest volume?&quot; or &quot;Why wasn&#x27;t this module tree-shaken?&quot; The system will intelligently analyze and provide optimization suggestions, helping you quickly identify and resolve build issues.</p>
<blockquote>
<p><a href="/guide/usage/mcp" class="rp-link">View usage details</a></p>
</blockquote>
<video src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/mcp-bundle-optimize-2.mp4" style="width:100%;height:auto;max-height:50vh;object-fit:cover;display:block" autoplay="" muted="" controls="" loop="" playsinline=""></video>
<hr/>
<p>In addition, the 1.1-1.2 versions also included other capability changes. For complete update details, please refer to: <a href="https://github.com/web-infra-dev/rsdoctor/releases" target="_blank" rel="noopener noreferrer" class="rp-link">Release page</a></p><!--/$-->]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Announcing Rsdoctor 1.0]]></title>
            <link>https://rsdoctor.rs/blog/release/release-note-1_0</link>
            <guid isPermaLink="false">/blog/release/release-note-1_0</guid>
            <pubDate>Wed, 19 Mar 2025 08:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<!--$--><p><em>March 19, 2025</em></p>
<h1 class="rp-toc-include" id="announcing-rsdoctor-10"><a href="#announcing-rsdoctor-10" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Announcing Rsdoctor 1.0<!-- --> </h1><div class="rp-not-doc rp-llms-container"><button class="rp-not-doc rp-llms-button rp-llms-copy-button"><div class="rp-llms-copy-button__icon-wrapper"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-llms-copy-button__icon-success"><path fill="currentColor" d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-llms-copy-button__icon-copy"><path fill="currentColor" d="M20 8v12H8V8zm0-2H8a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2"></path><path fill="currentColor" d="M4 16H2V4a2 2 0 0 1 2-2h12v2H4Z"></path></svg></div><span>Copy Markdown</span></button><button class="rp-llms-button rp-llms-view-options__trigger "><svg width="1em" height="1em" viewBox="0 0 32 32" class="rp-llms-view-options__arrow "><path fill="currentColor" d="M16 22 6 12l1.4-1.4 8.6 8.6 8.6-8.6L26 12z"></path></svg></button></div>
<p>We are excited to announce the official release of <strong>Rsdoctor 1.0</strong>!</p>
<p>After a year of development and testing, we are proud to introduce <strong>Rsdoctor 1.0</strong> — a build analyzer tailored for the <a href="https://rspack.rs/" target="_blank" rel="noopener noreferrer" class="rp-link">Rspack</a> ecosystem and fully compatible with the <a href="https://webpack.js.org/" target="_blank" rel="noopener noreferrer" class="rp-link">webpack</a> ecosystem.</p>
<p>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.</p>
<video src="https://assets.rspack.rs/others/assets/rsdoctor/rsdoctor-1.0-ui.mp4" style="width:100%;height:auto;max-height:50vh;object-fit:cover;display:block" autoplay="" muted="" controls="" loop="" playsinline=""></video>
<h2 class="rp-toc-include" id="why-rsdoctor"><a href="#why-rsdoctor" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Why Rsdoctor</h2>
<p>In the field of build analysis, the community already has some mature tools, such as <a href="https://github.com/webpack-contrib/webpack-bundle-analyzer" target="_blank" rel="noopener noreferrer" class="rp-link">webpack-bundle-analyzer</a> for visualizing bundles, and <a href="https://github.com/statoscope/statoscope/" target="_blank" rel="noopener noreferrer" class="rp-link">Statoscope</a> for comprehensive resource analysis. In addition, <a href="https://github.com/stephencookdev/speed-measure-webpack-plugin" target="_blank" rel="noopener noreferrer" class="rp-link">speed-measure-webpack-plugin</a> can be used to analyze the execution time of plugins and loaders, and locate build performance bottlenecks.</p>
<p>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.</p>
<p>In summary, community tools have the following areas for improvement:</p>
<ol>
<li><strong>Lack of detail</strong>: Traditional tools cannot delve into the details and changes of the build process, and to view the compilation details of a loader, developers often need to set breakpoints for step-by-step debugging.</li>
<li><strong>Functional limitations</strong>: Current analyser typically only display bundle data, lacking build scanning capabilities, unable to proactively provide optimization suggestions, and do not support custom scanning rules.</li>
<li><strong>Support for Rspack</strong>: Existing tools do not fully support Rspack, for example, they cannot analyze Rspack&#x27;s <a href="https://rspack.rs/guide/features/builtin-swc-loader" target="_blank" rel="noopener noreferrer" class="rp-link">builtin loader</a> of Rspack.</li>
</ol>
<h3 class="rp-toc-include" id="birth-of-rsdoctor"><a href="#birth-of-rsdoctor" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Birth of Rsdoctor</h3>
<p>Based on the above situation, we decided to develop a build analyzer focused on the Rspack ecosystem — <strong>Rsdoctor</strong>.</p>
<p>We designed an intuitive user interface for Rsdoctor, and Rsdoctor extends the <strong>loader profiling capability</strong> by combining the advantages of multiple tools to more deeply analyze the loader behavior in the compilation phase, <strong>built-in the scanning and detection rules for artifacts and compilation</strong>, and supports user <strong>custom rules</strong>.</p>
<p>Rsdoctor not only supports Rspack and webpack, but also supports all tools and frameworks based on Rspack or webpack, such as: <a href="https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-rsdoctor" target="_blank" rel="noopener noreferrer" class="rp-link">Docusaurus</a>, <a href="https://lynxjs.org/rspeedy/" target="_blank" rel="noopener noreferrer" class="rp-link">Rspeedy (Lynx)</a>, <a href="https://github.com/rstackjs/storybook-rsbuild" target="_blank" rel="noopener noreferrer" class="rp-link">Storybook</a>, <a href="https://nextjs.org/" target="_blank" rel="noopener noreferrer" class="rp-link">Next.js</a>, <a href="https://nuxt.com/" target="_blank" rel="noopener noreferrer" class="rp-link">Nuxt</a>, <a href="https://re-pack.dev/" target="_blank" rel="noopener noreferrer" class="rp-link">Re.Pack</a>, <a href="https://modernjs.dev/" target="_blank" rel="noopener noreferrer" class="rp-link">Modern.js</a>, <a href="https://rsbuild.rs/" target="_blank" rel="noopener noreferrer" class="rp-link">Rsbuild</a>, <a href="https://rspress.rs/" target="_blank" rel="noopener noreferrer" class="rp-link">Rspress</a> and <a href="https://rslib.rs/" target="_blank" rel="noopener noreferrer" class="rp-link">Rslib</a>.</p>
<p>Rsdoctor can be used to:</p>
<ul>
<li><strong>As a build analyzer</strong>: Help developers understand every aspect of the build process, and provide detailed compilation and bundle analysis.</li>
<li><strong>As an extensible analysis tool</strong>: Allow developers to customize analysis rules according to project requirements, and achieve targeted optimization of the build process.</li>
</ul>
<h2 class="rp-toc-include" id="who-is-using"><a href="#who-is-using" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Who is using</h2>
<p>Rsdoctor has been widely used within ByteDance, helping developers efficiently analyze and solve various problems in the build process.</p>
<p>Since its open source in 2024, Rsdoctor&#x27;s npm weekly downloads has exceeded <strong>100k</strong>. In the community, Rsdoctor has been integrated into frameworks such as <a href="https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-rsdoctor" target="_blank" rel="noopener noreferrer" class="rp-link">Docusaurus</a> and <a href="https://lynxjs.org/rspeedy/use-rsdoctor.html" target="_blank" rel="noopener noreferrer" class="rp-link">Lynx</a>. In addition, Rsdoctor has also been adopted by large projects such as <a href="https://github.com/getsentry/sentry/pull/63865" target="_blank" rel="noopener noreferrer" class="rp-link">Sentry</a>, <a href="https://github.com/nocobase/nocobase/blob/main/packages/core/build/src/buildPlugin.ts#L493" target="_blank" rel="noopener noreferrer" class="rp-link">NocoBase</a> and <a href="https://github.com/grafana/grafana/pull/94729" target="_blank" rel="noopener noreferrer" class="rp-link">Grafana</a>.</p>
<p>In the future, Rsdoctor will continue to provide first-class support for all tools in the <strong>Rstack</strong> (<code>Rspack stack</code> abbreviation) ecosystem:</p>
<img style="border-radius:12px" src="https://assets.rspack.rs/rstack/rstack-overview.png"/>
<h2 class="rp-toc-include" id="typical-use-cases"><a href="#typical-use-cases" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Typical use cases</h2>
<p>Rsdoctor offers a rich set of features, detailed content can be found in the <a href="/guide/start/features" class="rp-link">Feature Navigation</a>. Here are some typical use cases that demonstrate how Rsdoctor effectively solves common build problems:</p>
<h3 class="rp-toc-include" id="1-why-is-the-build-speed-too-slow"><a href="#1-why-is-the-build-speed-too-slow" class="rp-header-anchor rp-link" aria-hidden="true">#</a>1. &quot;Why is the build speed too slow?&quot;</h3>
<p>During the build process, if you find that the compilation speed is too slow, you can use the <a href="/guide/usage/loaders-timeline" class="rp-link">Loader Timeline</a> 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.</p>
<img style="border-radius:12px" src="https://assets.rspack.rs/rsdoctor/assets/loader-timeline-overall-v1-0.png"/>
<h3 class="rp-toc-include" id="2-outputs-are-not-as-expected"><a href="#2-outputs-are-not-as-expected" class="rp-header-anchor rp-link" aria-hidden="true">#</a>2. &quot;Outputs are not as expected?&quot;</h3>
<p>During the build, there may be problems where the outputs do not match expectations, such as runtime exceptions or style errors. The <a href="/guide/usage/loaders-analysis" class="rp-link">Loader Details</a> page of Rsdoctor can help you examine the changes made by the loader to a specific file before and after compilation.</p>
<img style="border-radius:12px" src="https://assets.rspack.rs/rsdoctor/assets/babel-import-errors-v1-0.png"/>
<h3 class="rp-toc-include" id="3-how-to-split-the-chunks-reasonably"><a href="#3-how-to-split-the-chunks-reasonably" class="rp-header-anchor rp-link" aria-hidden="true">#</a>3. &quot;How to split the chunks reasonably?&quot;</h3>
<p>We can use the <a href="/guide/usage/bundle-size" class="rp-link">Bundle Analysis</a> page to look at the modules tree of a particular artifact to see what modules the chunk contains, and then use the <a href="https://rspack.rs/zh/plugins/webpack/split-chunks-plugin" target="_blank" rel="noopener noreferrer" class="rp-link">splitChunks</a> configuration of Rspack to split the chunks appropriately.</p>
<img style="border-radius:12px" src="https://assets.rspack.rs/rsdoctor/assets/bundle-size-overall-v1-0.png"/>
<h3 class="rp-toc-include" id="4-how-to-analyze-the-reasons-for-the-increase-in-bundle-size"><a href="#4-how-to-analyze-the-reasons-for-the-increase-in-bundle-size" class="rp-header-anchor rp-link" aria-hidden="true">#</a>4. &quot;How to analyze the reasons for the increase in bundle size?&quot;</h3>
<p>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 <a href="/guide/usage/bundle-diff" class="rp-link">Bundle Diff</a> 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.</p>
<img style="border-radius:12px" src="https://assets.rspack.rs/rsdoctor/assets/bundle-diff-assets-v1-0.png"/>
<h3 class="rp-toc-include" id="5-why-is-a-certain-module-bundled"><a href="#5-why-is-a-certain-module-bundled" class="rp-header-anchor rp-link" aria-hidden="true">#</a>5. &quot;Why is a certain module bundled?&quot;</h3>
<p>During the build process, if you want to know why a certain module file is bundled into the artifact, you can click on the <code>Module Graph</code> icon behind the module in the Modules tree on the <a href="/guide/usage/bundle-size" class="rp-link">Artifact Analysis</a> page to view the upstream dependency relationship of the module.</p>
<img style="width:700px;margin:auto;border-radius:12px" src="https://assets.rspack.rs/rsdoctor/assets/module-analysis-tree-v1-0.png"/>
<h2 class="rp-toc-include" id="whats-new-in-10"><a href="#whats-new-in-10" class="rp-header-anchor rp-link" aria-hidden="true">#</a>What&#x27;s new in 1.0</h2>
<h3 class="rp-toc-include" id="-brand-new-ui"><a href="#-brand-new-ui" class="rp-header-anchor rp-link" aria-hidden="true">#</a>🎨 Brand new UI</h3>
<p>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.</p>
<h3 class="rp-toc-include" id="-faster-analysis"><a href="#-faster-analysis" class="rp-header-anchor rp-link" aria-hidden="true">#</a>🚀 Faster analysis</h3>
<p>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.</p>
<p>This optimization effectively improves the build analysis performance of Rsdoctor, and reduces the overall analysis time by more than <strong>20%</strong>. In the future, we will continue to native more modules to further improve the analysis efficiency.</p>
<p>This optimization can be enabled through the <a href="/config/options/options#enablenativeplugin" class="rp-link">enableNativePlugin</a> option:</p>
<div class="rp-codeblock language-ts"><div class="rp-codeblock__content"><div class="rp-codeblock__content__scroll-container rp-scrollbar rp-scrollbar--always"><pre class="shiki css-variables" style="background-color:var(--shiki-background);color:var(--shiki-foreground)" tabindex="0" data-lang="ts"><code><span class="line"><span style="color:var(--shiki-token-keyword)">new</span><span style="color:var(--shiki-token-function)"> RsdoctorRspackPlugin</span><span style="color:var(--shiki-foreground)">({</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">  experiments</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-foreground)"> {</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">    enableNativePlugin</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-token-constant)"> true</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">  }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">});</span></span></code></pre></div><div class="rp-code-button-group"><button class="rp-code-button-group__button rp-code-wrap-button" title="Toggle code wrap"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-button-group__icon--wrapped"><path fill="currentColor" d="M21 5H3v2h18zM3 19h7v-2H3zm0-6h15c1 0 2 .43 2 2s-1 2-2 2h-2v-2l-4 3 4 3v-2h2c2.95 0 4-1.27 4-4 0-2.72-1-4-4-4H3z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-button-group__icon--wrap"><path fill="currentColor" d="M16 7H3V5h13zM3 19h13v-2H3zm19-7-4-3v2H3v2h15v2z"></path></svg></button><button class="rp-code-button-group__button rp-code-copy-button" title="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-copy-button__icon rp-code-copy-button__icon--copy"><path fill="currentColor" d="M20 8v12H8V8zm0-2H8a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2"></path><path fill="currentColor" d="M4 16H2V4a2 2 0 0 1 2-2h12v2H4Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-copy-button__icon rp-code-copy-button__icon--success"><path fill="currentColor" d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"></path></svg></button></div></div></div>
<h3 class="rp-toc-include" id="-module-searching"><a href="#-module-searching" class="rp-header-anchor rp-link" aria-hidden="true">#</a>🔍 Module searching</h3>
<ul>
<li><strong>Search Module Capability</strong>: In the <code>Bundle Size</code> page, we have added a module search function. Users can quickly locate and view the <code>Assets</code> where the module is located by entering the module name, making it more convenient to analyze the reference relationship and size of the module. <a href="/guide/usage/bundle-size#模块搜索功能" class="rp-link">Details</a></li>
</ul>
<img style="width:80%;margin:auto;border-radius:12px" src="https://assets.rspack.rs/rsdoctor/assets/search-modules-v1-0.png"/>
<h3 class="rp-toc-include" id="️-new-scanning-rules"><a href="#️-new-scanning-rules" class="rp-header-anchor rp-link" aria-hidden="true">#</a>🛠️ New scanning rules</h3>
<ul>
<li><a href="/guide/rules/rules#e1002-cross-chunks-package" class="rp-link">Duplicate package detection</a>: Added a rule for detecting duplicate packages across chunks, which can scan for duplicate packages in different <code>chunks</code>. These duplicate packages may cause redundant code in the build.</li>
<li><a href="/guide/rules/rules#e1004-ecma-version-check" class="rp-link">ECMA version checking</a>: Enhanced the ECMA version detection rule, used to detect incompatible advanced syntax.</li>
</ul>
<div class="rp-codeblock language-ts"><div class="rp-codeblock__content"><div class="rp-codeblock__content__scroll-container rp-scrollbar rp-scrollbar--always"><pre class="shiki css-variables" style="background-color:var(--shiki-background);color:var(--shiki-foreground)" tabindex="0" data-lang="ts"><code><span class="line"><span style="color:var(--shiki-token-keyword)">new</span><span style="color:var(--shiki-token-function)"> RsdoctorRspackPlugin</span><span style="color:var(--shiki-foreground)">({</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">  linter</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-foreground)"> {</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">    rules</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-foreground)"> {</span></span>
<span class="line"><span style="color:var(--shiki-token-string-expression)">      &#x27;ecma-version-check&#x27;</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-foreground)"> [</span></span>
<span class="line"><span style="color:var(--shiki-token-string-expression)">        &#x27;Warn&#x27;</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">        {</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">          ecmaVersion</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-token-constant)"> 2015</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">        }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">      ]</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">    }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">  }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">});</span></span></code></pre></div><div class="rp-code-button-group"><button class="rp-code-button-group__button rp-code-wrap-button" title="Toggle code wrap"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-button-group__icon--wrapped"><path fill="currentColor" d="M21 5H3v2h18zM3 19h7v-2H3zm0-6h15c1 0 2 .43 2 2s-1 2-2 2h-2v-2l-4 3 4 3v-2h2c2.95 0 4-1.27 4-4 0-2.72-1-4-4-4H3z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-button-group__icon--wrap"><path fill="currentColor" d="M16 7H3V5h13zM3 19h13v-2H3zm19-7-4-3v2H3v2h15v2z"></path></svg></button><button class="rp-code-button-group__button rp-code-copy-button" title="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-copy-button__icon rp-code-copy-button__icon--copy"><path fill="currentColor" d="M20 8v12H8V8zm0-2H8a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2"></path><path fill="currentColor" d="M4 16H2V4a2 2 0 0 1 2-2h12v2H4Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-copy-button__icon rp-code-copy-button__icon--success"><path fill="currentColor" d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"></path></svg></button></div></div></div>
<h2 class="rp-toc-include" id="how-to-use-10"><a href="#how-to-use-10" class="rp-header-anchor rp-link" aria-hidden="true">#</a>How to use 1.0</h2>
<ul>
<li>If you are using any tool or framework based on Rspack or webpack, you can refer to the <a href="/guide/start/quick-start" class="rp-link">Quick Start</a> to start using Rsdoctor.</li>
<li>If you are using Rsdoctor 0.4 or earlier, please note that 1.0 contains a few incompatible updates:<!-- -->
<ul>
<li>The <code>reportCodeType</code> and <code>reportDir</code> configuration items in the plugin configuration have been moved to <a href="/config/options/options#reportcodetype" class="rp-link">output</a>.</li>
</ul>
</li>
</ul>
<blockquote>
<p>Welcome to give a star 🌟 to the <a href="https://github.com/web-infra-dev/rsdoctor" target="_blank" rel="noopener noreferrer" class="rp-link">Rsdoctor GitHub</a> repository.</p>
</blockquote>
<h2 class="rp-toc-include" id="next-steps"><a href="#next-steps" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Next steps</h2>
<ul>
<li><strong>AI powered analysis</strong>: The build analysis data collected by Rsdoctor is very rich, but there may be a certain learning curve for new users. Therefore, we will integrate AI capabilities into Rsdoctor to help users quickly extract key information from massive data, provide intelligent optimization suggestions, and reduce the threshold of build analysis.</li>
<li><strong>CI proactive monitoring</strong>: Rsdoctor will extend its capabilities in CI environments by introducing <a href="https://github.com/web-infra-dev/rsdoctor/discussions/491" target="_blank" rel="noopener noreferrer" class="rp-link">Rsdoctor CI Action</a>, based on the existing <a href="/guide/usage/bundle-diff" class="rp-link">Bundle Diff</a> feature. This will provide automated monitoring of bundle sizes and alerts for performance issues to ensure quality.</li>
<li><strong>Further Native</strong>: Due to the implementation of Rspack in Rust and the use of a multi-threaded architecture, the current analysis of the built-in loader of Rspack by Rsdoctor is not accurate enough. We plan to optimize the analysis mechanism based on <a href="/config/options/options#enablenativeplugin" class="rp-link">Rspack Native Plugin</a>, and provide more accurate loader performance data and compilation behavior insights.</li>
</ul>
<p><strong>Finally, thank you to all the developers who have contributed to Rsdoctor ❤️</strong>:</p>
<p><a href="https://github.com/9aoy" target="_blank" rel="noopener noreferrer" class="rp-link">@9aoy</a>、<a href="https://github.com/bin1357" target="_blank" rel="noopener noreferrer" class="rp-link">@bin1357</a>、<a href="https://github.com/cairon666" target="_blank" rel="noopener noreferrer" class="rp-link">@cairon666</a>、<a href="https://github.com/cclap2020" target="_blank" rel="noopener noreferrer" class="rp-link">@cclap2020</a>、<a href="https://github.com/charpeni" target="_blank" rel="noopener noreferrer" class="rp-link">@charpeni</a>、<a href="https://github.com/chenjiahan" target="_blank" rel="noopener noreferrer" class="rp-link">@chenjiahan</a>、<a href="https://github.com/ChuHoMan" target="_blank" rel="noopener noreferrer" class="rp-link">@ChuHoMan</a>、<a href="https://github.com/cnryb" target="_blank" rel="noopener noreferrer" class="rp-link">@cnryb</a>、<a href="https://github.com/Gehbt" target="_blank" rel="noopener noreferrer" class="rp-link">@Gehbt</a>、<a href="https://github.com/gezhicui" target="_blank" rel="noopener noreferrer" class="rp-link">@gezhicui</a>、<a href="https://github.com/HigherOrderLogic" target="_blank" rel="noopener noreferrer" class="rp-link">@HigherOrderLogic</a>、<a href="https://github.com/iamleniac" target="_blank" rel="noopener noreferrer" class="rp-link">@iamleniac</a>、<a href="https://github.com/inottn" target="_blank" rel="noopener noreferrer" class="rp-link">@inottn</a>、<a href="https://github.com/jkzing" target="_blank" rel="noopener noreferrer" class="rp-link">@jkzing</a>、<a href="https://github.com/KyrieLii" target="_blank" rel="noopener noreferrer" class="rp-link">@KyrieLii</a>、<a href="https://github.com/kwonoj" target="_blank" rel="noopener noreferrer" class="rp-link">@kwonoj</a>、<a href="https://github.com/LingyuCoder" target="_blank" rel="noopener noreferrer" class="rp-link">@LingyuCoder</a>、<a href="https://github.com/nanianlisao" target="_blank" rel="noopener noreferrer" class="rp-link">@nanianlisao</a>、<a href="https://github.com/nhducit" target="_blank" rel="noopener noreferrer" class="rp-link">@nhducit</a>、<a href="https://github.com/NickBolles" target="_blank" rel="noopener noreferrer" class="rp-link">@NickBolles</a>、<a href="https://github.com/nyqykk" target="_blank" rel="noopener noreferrer" class="rp-link">@nyqykk</a>、<a href="https://github.com/puppet-666" target="_blank" rel="noopener noreferrer" class="rp-link">@puppet-666</a>、<a href="https://github.com/SoonIter" target="_blank" rel="noopener noreferrer" class="rp-link">@SoonIter</a>、<a href="https://github.com/sudhakar-s" target="_blank" rel="noopener noreferrer" class="rp-link">@sudhakar-s</a>、<a href="https://github.com/Timeless0911" target="_blank" rel="noopener noreferrer" class="rp-link">@Timeless0911</a>、<a href="https://github.com/tinywaves" target="_blank" rel="noopener noreferrer" class="rp-link">@tinywaves</a>、<a href="https://github.com/trueLoving" target="_blank" rel="noopener noreferrer" class="rp-link">@trueLoving</a>、<a href="https://github.com/wChenonly" target="_blank" rel="noopener noreferrer" class="rp-link">@wChenonly</a>、<a href="https://github.com/zllkjc" target="_blank" rel="noopener noreferrer" class="rp-link">@zllkjc</a>。</p><!--/$-->]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Announcing Rsdoctor 0.4]]></title>
            <link>https://rsdoctor.rs/blog/release/release-note-0_4</link>
            <guid isPermaLink="false">/blog/release/release-note-0_4</guid>
            <pubDate>Wed, 09 Oct 2024 08:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<!--$--><p><em>October 09, 2024</em></p>
<h1 class="rp-toc-include" id="announcing-rsdoctor-04"><a href="#announcing-rsdoctor-04" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Announcing Rsdoctor 0.4<!-- --> </h1><div class="rp-not-doc rp-llms-container"><button class="rp-not-doc rp-llms-button rp-llms-copy-button"><div class="rp-llms-copy-button__icon-wrapper"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-llms-copy-button__icon-success"><path fill="currentColor" d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-llms-copy-button__icon-copy"><path fill="currentColor" d="M20 8v12H8V8zm0-2H8a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2"></path><path fill="currentColor" d="M4 16H2V4a2 2 0 0 1 2-2h12v2H4Z"></path></svg></div><span>Copy Markdown</span></button><button class="rp-llms-button rp-llms-view-options__trigger "><svg width="1em" height="1em" viewBox="0 0 32 32" class="rp-llms-view-options__arrow "><path fill="currentColor" d="M16 22 6 12l1.4-1.4 8.6 8.6 8.6-8.6L26 12z"></path></svg></button></div>
<p>Rsdoctor 0.4 is now released!</p>
<p>The new features of Rsdoctor 0.4 include:</p>
<ul>
<li><strong>Brief Mode</strong>: Outputs a single HTML file, ideal for CI processes.</li>
<li><strong>Bundle Diff</strong>: Compare and analyze changes between two build artifacts.</li>
<li><strong>Vue Loader Analysis</strong>: Added support for loader analysis in Vue projects.</li>
</ul>
<h2 class="rp-toc-include" id="brief-mode"><a href="#brief-mode" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Brief mode</h2>
<p>In Rsdoctor 0.4, a new <strong>Brief mode</strong> has been added, designed specifically for CI/CD scenarios. Brief mode consolidates the data report into a single HTML page, making it convenient for users to view historical build data in CI/CD and other scenarios. The main features of Brief mode are:</p>
<ul>
<li><strong>Single report file</strong>: Previously, Rsdoctor output multiple report data and <code>Manifest.json</code>, which was inconvenient for CDN upload and sharing. Brief mode outputs a single report, making it convenient for use in CI processes.</li>
<li><strong>Easy to configure</strong>: Enable by configuring the <a href="/config/options/options#mode" class="rp-link">mode.brief</a> option in the Rsdoctor plugin.</li>
<li><strong>Report output</strong>: The report will be generated in the build artifacts directory, and the output directory and filename of the Brief report can be configured.</li>
</ul>
<p>This feature greatly enhances the convenience of using Rsdoctor analysis reports in CI processes. The report can be uploaded to a CDN in the pipeline to display historical reports. <a href="/guide/start/cicd" class="rp-link">For more details, please refer to</a></p>
<h2 class="rp-toc-include" id="bundle-diff"><a href="#bundle-diff" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Bundle diff</h2>
<!-- -->
<span class="rp-badge rp-badge--warning">Version: 0.4.5</span>
<p>The <strong>Bundle Diff</strong> feature helps users compare and analyze changes between two build artifacts. Key capabilities include:</p>
<ul>
<li><strong>Total size change</strong>: Displays the total size change between two build artifacts.</li>
<li><strong>File type change</strong>: Compares the size changes of different types of files (JS, CSS, images, fonts, etc.).</li>
<li><strong>First screen resource change</strong>: Analyzes the size changes of resources loaded on the first screen.</li>
<li><strong>Duplicate package count change</strong>: Counts and compares the number of duplicate packages between two builds.</li>
<li><strong>NPM Packages change</strong>: Displays changes in the number of NPM packages, including added, removed, and changed packages.</li>
<li><strong>Detailed data query</strong>: Provides a detailed list module for deeper data query and analysis.</li>
<li><strong>Module-level comparison</strong>: View the name, size, and change rate of modules, and supports viewing the code changes of modules.</li>
</ul>
<div style="display:flex;justify-content:space-between"><img src="https://assets.rspack.rs/others/assets/rsdoctor/bundle-diff-cards.png" style="width:48%"/><img src="https://assets.rspack.rs/others/assets/rsdoctor/bundle-diff-module-list.png" style="width:48%"/></div>
<p>This feature enhances the user&#x27;s ability to visually analyze changes in build artifacts, helping users better understand and optimize build results. <a href="/guide/usage/bundle-diff" class="rp-link">For more details, please refer to</a></p>
<h3 class="rp-toc-include" id="next"><a href="#next" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Next</h3>
<p>Plans to support Bundle Diff Action on GitHub to simplify degradation monitoring during the CI phase.</p>
<h2 class="rp-toc-include" id="vue-loader-analysis"><a href="#vue-loader-analysis" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Vue loader analysis</h2>
<span class="rp-badge rp-badge--warning">Version: 0.4.5</span>
<p>Support for loader analysis for Vue projects has been added in Rsdoctor 0.4.</p>
<img src="https://assets.rspack.rs/others/assets/rsdoctor/vue-loader.png"/>
<h2 class="rp-toc-include" id="other-features"><a href="#other-features" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Other features</h2>
<ul>
<li>
<p><strong>Rspack&#x27;s builtin:lightningcss-loader analysis</strong>: Added support for <a href="https://rspack.rs/guide/features/builtin-lightningcss-loader#builtin-lightningcss-loader" target="_blank" rel="noopener noreferrer" class="rp-link">builtin:lightningcss-loader</a> analysis.</p>
</li>
<li>
<p><strong>Performance optimization</strong>:</p>
<ul>
<li>Reduced the size of the <code>@rsdoctor/client</code> package by 60%, improving page rendering speed.</li>
</ul>
<img src="https://assets.rspack.rs/others/assets/rsdoctor/package-size-diff.png" style="width:60%;margin:auto"/>
<ul>
<li>Reduced third-party dependencies, thereby reducing the total download size
during installation.</li>
</ul>
</li>
</ul><!--/$-->]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Announcing Rsdoctor 0.3]]></title>
            <link>https://rsdoctor.rs/blog/release/release-note-0_3</link>
            <guid isPermaLink="false">/blog/release/release-note-0_3</guid>
            <pubDate>Sun, 02 Jun 2024 08:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<!--$--><p><em>June 02, 2024</em></p>
<h1 class="rp-toc-include" id="announcing-rsdoctor-03"><a href="#announcing-rsdoctor-03" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Announcing Rsdoctor 0.3<!-- --> </h1><div class="rp-not-doc rp-llms-container"><button class="rp-not-doc rp-llms-button rp-llms-copy-button"><div class="rp-llms-copy-button__icon-wrapper"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-llms-copy-button__icon-success"><path fill="currentColor" d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-llms-copy-button__icon-copy"><path fill="currentColor" d="M20 8v12H8V8zm0-2H8a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2"></path><path fill="currentColor" d="M4 16H2V4a2 2 0 0 1 2-2h12v2H4Z"></path></svg></div><span>Copy Markdown</span></button><button class="rp-llms-button rp-llms-view-options__trigger "><svg width="1em" height="1em" viewBox="0 0 32 32" class="rp-llms-view-options__arrow "><path fill="currentColor" d="M16 22 6 12l1.4-1.4 8.6 8.6 8.6-8.6L26 12z"></path></svg></button></div>
<p>Rsdoctor 0.3 has been released!</p>
<p>The new features of Rsdoctor 0.3 include:</p>
<ul>
<li>Custom Extension Rules: Users can customize their own rule checks through the interface.</li>
<li>Support for Banner Plugin: Added support for the Banner Plugin, which adds template wrapping to the bundled code, allowing analysis of code changes.</li>
<li>Support for ESM Loader Analysis: Added support for analyzing ESM Loaders in the compilation analysis in Rspack.</li>
</ul>
<h2 class="rp-toc-include" id="custom-extension-rules"><a href="#custom-extension-rules" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Custom extension rules</h2>
<p>Considering that users may have their own specific rule definition requirements, Rsdoctor provides an external interface for users to customize their own rule checks in addition to the internal rules already available.
External extension interfaces need to be configured on the Rsdoctor plugin through the <code>extends</code> field, and their configurations are also placed in the <code>rules</code> field.</p>
<p>For more details, please refer to: <a href="/guide/rules/rule-custom" class="rp-link">Custom Extension Rules</a></p>
<p>Additionally, the use of custom rules can also be applied for user data collection and reporting. <a href="/guide/rules/upload-data" class="rp-link">Data Reporting</a></p>
<ul>
<li>Example:</li>
</ul>
<div class="rp-codeblock language-ts"><div class="rp-codeblock__content"><div class="rp-codeblock__content__scroll-container rp-scrollbar rp-scrollbar--always"><pre class="shiki css-variables" style="background-color:var(--shiki-background);color:var(--shiki-foreground)" tabindex="0" data-lang="ts"><code><span class="line"><span style="color:var(--shiki-token-comment)">// src/rules/assets-count-limit.ts</span></span>
<span class="line"><span style="color:var(--shiki-token-keyword)">import</span><span style="color:var(--shiki-foreground)"> { defineRule } </span><span style="color:var(--shiki-token-keyword)">from</span><span style="color:var(--shiki-token-string-expression)"> &#x27;@rsdoctor/core/rules&#x27;</span><span style="color:var(--shiki-foreground)">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--shiki-token-keyword)">export</span><span style="color:var(--shiki-token-keyword)"> const</span><span style="color:var(--shiki-token-constant)"> AssetsCountLimit</span><span style="color:var(--shiki-token-keyword)"> =</span><span style="color:var(--shiki-token-function)"> defineRule</span><span style="color:var(--shiki-foreground)">(() </span><span style="color:var(--shiki-token-keyword)">=&gt;</span><span style="color:var(--shiki-foreground)"> ({</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">  meta</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-foreground)"> {</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">    category</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-token-string-expression)"> &#x27;bundle&#x27;</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">    severity</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-token-string-expression)"> &#x27;Warn&#x27;</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">    title</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-token-string-expression)"> &#x27;assets-count-limit&#x27;</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">    defaultConfig</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-foreground)"> {</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">      limit</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-token-constant)"> 10</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">    }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">  }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-token-function)">  check</span><span style="color:var(--shiki-foreground)">({ chunkGraph</span><span style="color:var(--shiki-token-punctuation)">,</span><span style="color:var(--shiki-foreground)"> report</span><span style="color:var(--shiki-token-punctuation)">,</span><span style="color:var(--shiki-foreground)"> ruleConfig }) {</span></span>
<span class="line"><span style="color:var(--shiki-token-keyword)">    const</span><span style="color:var(--shiki-token-constant)"> assets</span><span style="color:var(--shiki-token-keyword)"> =</span><span style="color:var(--shiki-token-constant)"> chunkGraph</span><span style="color:var(--shiki-token-function)">.getAssets</span><span style="color:var(--shiki-foreground)">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--shiki-token-keyword)">    if</span><span style="color:var(--shiki-foreground)"> (</span><span style="color:var(--shiki-token-constant)">assets</span><span style="color:var(--shiki-foreground)">.</span><span style="color:var(--shiki-token-constant)">length</span><span style="color:var(--shiki-token-keyword)"> &gt;</span><span style="color:var(--shiki-token-constant)"> ruleConfig</span><span style="color:var(--shiki-foreground)">.limit) {</span></span>
<span class="line"><span style="color:var(--shiki-token-function)">      report</span><span style="color:var(--shiki-foreground)">({</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">        message</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-token-string-expression)"> &#x27;The count of assets is bigger than limit&#x27;</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">        detail</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-foreground)"> {</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">          type</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-token-string-expression)"> &#x27;link&#x27;</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">          link</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-token-string-expression)"> &#x27;https://rsdoctor.rs/zh/guide/start/quick-start&#x27;</span><span style="color:var(--shiki-token-punctuation)">,</span><span style="color:var(--shiki-token-comment)"> // This link just for show case.</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">        }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">      });</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">    }</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">  }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">}));</span></span></code></pre></div><div class="rp-code-button-group"><button class="rp-code-button-group__button rp-code-wrap-button" title="Toggle code wrap"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-button-group__icon--wrapped"><path fill="currentColor" d="M21 5H3v2h18zM3 19h7v-2H3zm0-6h15c1 0 2 .43 2 2s-1 2-2 2h-2v-2l-4 3 4 3v-2h2c2.95 0 4-1.27 4-4 0-2.72-1-4-4-4H3z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-button-group__icon--wrap"><path fill="currentColor" d="M16 7H3V5h13zM3 19h13v-2H3zm19-7-4-3v2H3v2h15v2z"></path></svg></button><button class="rp-code-button-group__button rp-code-copy-button" title="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-copy-button__icon rp-code-copy-button__icon--copy"><path fill="currentColor" d="M20 8v12H8V8zm0-2H8a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2"></path><path fill="currentColor" d="M4 16H2V4a2 2 0 0 1 2-2h12v2H4Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-copy-button__icon rp-code-copy-button__icon--success"><path fill="currentColor" d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"></path></svg></button></div></div></div>
<div class="rp-codeblock language-ts"><div class="rp-codeblock__content"><div class="rp-codeblock__content__scroll-container rp-scrollbar rp-scrollbar--always"><pre class="shiki css-variables" style="background-color:var(--shiki-background);color:var(--shiki-foreground)" tabindex="0" data-lang="ts"><code><span class="line"><span style="color:var(--shiki-token-comment)">// rsbuild.config.ts</span></span>
<span class="line"><span style="color:var(--shiki-token-keyword)">import</span><span style="color:var(--shiki-foreground)"> { AssetsCountLimit } </span><span style="color:var(--shiki-token-keyword)">from</span><span style="color:var(--shiki-token-string-expression)"> &#x27;./rules/assets-count-limit&#x27;</span><span style="color:var(--shiki-foreground)">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--shiki-token-keyword)">export</span><span style="color:var(--shiki-token-keyword)"> default</span><span style="color:var(--shiki-foreground)"> {</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">  tools</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-foreground)"> {</span></span>
<span class="line"><span style="color:var(--shiki-token-function)">    bundlerChain</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-foreground)"> (chain) </span><span style="color:var(--shiki-token-keyword)">=&gt;</span><span style="color:var(--shiki-foreground)"> {</span></span>
<span class="line"><span style="color:var(--shiki-token-constant)">      chain</span><span style="color:var(--shiki-token-function)">.plugin</span><span style="color:var(--shiki-foreground)">(</span><span style="color:var(--shiki-token-string-expression)">&#x27;Rsdoctor&#x27;</span><span style="color:var(--shiki-foreground)">)</span><span style="color:var(--shiki-token-function)">.use</span><span style="color:var(--shiki-foreground)">(RsdoctorRspackPlugin</span><span style="color:var(--shiki-token-punctuation)">,</span><span style="color:var(--shiki-foreground)"> [</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">        {</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">          linter</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-foreground)"> {</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">            level</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-token-string-expression)"> &#x27;Error&#x27;</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">            extends</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-foreground)"> [AssetsCountLimit]</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">            rules</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-foreground)"> {</span></span>
<span class="line"><span style="color:var(--shiki-token-string-expression)">              &#x27;assets-count-limit&#x27;</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-foreground)"> [</span></span>
<span class="line"><span style="color:var(--shiki-token-string-expression)">                &#x27;on&#x27;</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">                {</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">                  limit</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-token-constant)"> 1</span><span style="color:var(--shiki-token-punctuation)">,</span><span style="color:var(--shiki-token-comment)"> // rule custom configs</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">                }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">              ]</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">            }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">          }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">        }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">      ]);</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">    }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">  }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">};</span></span></code></pre></div><div class="rp-code-button-group"><button class="rp-code-button-group__button rp-code-wrap-button" title="Toggle code wrap"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-button-group__icon--wrapped"><path fill="currentColor" d="M21 5H3v2h18zM3 19h7v-2H3zm0-6h15c1 0 2 .43 2 2s-1 2-2 2h-2v-2l-4 3 4 3v-2h2c2.95 0 4-1.27 4-4 0-2.72-1-4-4-4H3z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-button-group__icon--wrap"><path fill="currentColor" d="M16 7H3V5h13zM3 19h13v-2H3zm19-7-4-3v2H3v2h15v2z"></path></svg></button><button class="rp-code-button-group__button rp-code-copy-button" title="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-copy-button__icon rp-code-copy-button__icon--copy"><path fill="currentColor" d="M20 8v12H8V8zm0-2H8a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2"></path><path fill="currentColor" d="M4 16H2V4a2 2 0 0 1 2-2h12v2H4Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-copy-button__icon rp-code-copy-button__icon--success"><path fill="currentColor" d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"></path></svg></button></div></div></div>
<h2 class="rp-toc-include" id="support-for-banner-plugin"><a href="#support-for-banner-plugin" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Support for banner plugin</h2>
<p>Both Rspack and webpack support the BannerPlugin, which is an built-in plugin that allows you to add specific content at the top or bottom of the generated chunks. The added code will affect the parsing capability of the bundle.</p>
<p>Therefore, Rsdoctor has added support for the Banner Plugin.</p>
<p>Please refer to <a href="/guide/usage/bundle-size#support-for-bannerplugin" class="rp-link">Support for BannerPlugin</a></p>
<h2 class="rp-toc-include" id="support-for-esm-loader"><a href="#support-for-esm-loader" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Support for ESM loader</h2>
<p>Starting from Rspack@0.7.3, support for ESM Loader execution with <code>.js</code> extension and <code>type: module</code> configuration in <code>package.json</code> is added (<a href="https://github.com/web-infra-dev/rspack/issues/5735" target="_blank" rel="noopener noreferrer" class="rp-link">related issue</a>). Therefore, Rsdoctor also supports the analysis of ESM Loader, mainly supporting the following two types:</p>
<ol>
<li>ESM Loader with <code>.mjs</code> extension.</li>
<li>ESM Loader with <code>.js</code> extension and <code>type: module</code> configuration in <code>package.json</code>.</li>
</ol>
<h3 class="rp-toc-include" id="support-for-defining-port"><a href="#support-for-defining-port" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Support for defining port</h3>
<p>Support for <a href="/config/options/options#port" class="rp-link">defining the port of Rsdoctor service</a> has been added.</p>
<ul>
<li>Example:</li>
</ul>
<div class="rp-codeblock language-ts"><div class="rp-codeblock__content"><div class="rp-codeblock__content__scroll-container rp-scrollbar rp-scrollbar--always"><pre class="shiki css-variables" style="background-color:var(--shiki-background);color:var(--shiki-foreground)" tabindex="0" data-lang="ts"><code><span class="line"><span style="color:var(--shiki-token-constant)">chain</span><span style="color:var(--shiki-token-function)">.plugin</span><span style="color:var(--shiki-foreground)">(</span><span style="color:var(--shiki-token-string-expression)">&#x27;Rsdoctor&#x27;</span><span style="color:var(--shiki-foreground)">)</span><span style="color:var(--shiki-token-function)">.use</span><span style="color:var(--shiki-foreground)">(RsdoctorRspackPlugin</span><span style="color:var(--shiki-token-punctuation)">,</span><span style="color:var(--shiki-foreground)"> [</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">  {</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">    port</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-token-constant)"> 8888</span><span style="color:var(--shiki-token-punctuation)">,</span><span style="color:var(--shiki-token-comment)"> // port</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">  }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">]);</span></span></code></pre></div><div class="rp-code-button-group"><button class="rp-code-button-group__button rp-code-wrap-button" title="Toggle code wrap"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-button-group__icon--wrapped"><path fill="currentColor" d="M21 5H3v2h18zM3 19h7v-2H3zm0-6h15c1 0 2 .43 2 2s-1 2-2 2h-2v-2l-4 3 4 3v-2h2c2.95 0 4-1.27 4-4 0-2.72-1-4-4-4H3z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-button-group__icon--wrap"><path fill="currentColor" d="M16 7H3V5h13zM3 19h13v-2H3zm19-7-4-3v2H3v2h15v2z"></path></svg></button><button class="rp-code-button-group__button rp-code-copy-button" title="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-copy-button__icon rp-code-copy-button__icon--copy"><path fill="currentColor" d="M20 8v12H8V8zm0-2H8a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2"></path><path fill="currentColor" d="M4 16H2V4a2 2 0 0 1 2-2h12v2H4Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-copy-button__icon rp-code-copy-button__icon--success"><path fill="currentColor" d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"></path></svg></button></div></div></div>
<h2 class="rp-toc-include" id="support-for-parse-bundle-configuration"><a href="#support-for-parse-bundle-configuration" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Support for parse bundle configuration</h2>
<p>In some large repositories, the execution time for parsing bundles is significant. This is because the Parse Bundle analysis relies on AST parsing and processing, which can be time-consuming when there are a large number of files.
If this capability is not necessary, it can be selectively disabled using the <code>supports.parseBundle</code> configuration. Here is an example:</p>
<div class="rp-codeblock language-ts"><div class="rp-codeblock__content"><div class="rp-codeblock__content__scroll-container rp-scrollbar rp-scrollbar--always"><pre class="shiki css-variables" style="background-color:var(--shiki-background);color:var(--shiki-foreground)" tabindex="0" data-lang="ts"><code><span class="line"><span style="color:var(--shiki-token-constant)">chain</span><span style="color:var(--shiki-token-function)">.plugin</span><span style="color:var(--shiki-foreground)">(</span><span style="color:var(--shiki-token-string-expression)">&#x27;Rsdoctor&#x27;</span><span style="color:var(--shiki-foreground)">)</span><span style="color:var(--shiki-token-function)">.use</span><span style="color:var(--shiki-foreground)">(RsdoctorRspackPlugin</span><span style="color:var(--shiki-token-punctuation)">,</span><span style="color:var(--shiki-foreground)"> [</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">  {</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">    supports</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-foreground)"> {</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">      parseBundle</span><span style="color:var(--shiki-token-keyword)">:</span><span style="color:var(--shiki-token-constant)"> false</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">    }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">  }</span><span style="color:var(--shiki-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--shiki-foreground)">]);</span></span></code></pre></div><div class="rp-code-button-group"><button class="rp-code-button-group__button rp-code-wrap-button" title="Toggle code wrap"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-button-group__icon--wrapped"><path fill="currentColor" d="M21 5H3v2h18zM3 19h7v-2H3zm0-6h15c1 0 2 .43 2 2s-1 2-2 2h-2v-2l-4 3 4 3v-2h2c2.95 0 4-1.27 4-4 0-2.72-1-4-4-4H3z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-button-group__icon--wrap"><path fill="currentColor" d="M16 7H3V5h13zM3 19h13v-2H3zm19-7-4-3v2H3v2h15v2z"></path></svg></button><button class="rp-code-button-group__button rp-code-copy-button" title="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-copy-button__icon rp-code-copy-button__icon--copy"><path fill="currentColor" d="M20 8v12H8V8zm0-2H8a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2"></path><path fill="currentColor" d="M4 16H2V4a2 2 0 0 1 2-2h12v2H4Z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-code-button-group__icon rp-code-copy-button__icon rp-code-copy-button__icon--success"><path fill="currentColor" d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"></path></svg></button></div></div></div>
<p>Disabling the Parse Bundle capability only affects the ability to view the final bundled size and code of modules in the bundle (Bundled Code).</p>
<div style="display:flex"><img src="https://assets.rspack.rs/others/assets/rsdoctor/bundled-size.jpeg" height="300px" width="400px" style="margin:auto"/><img src="https://assets.rspack.rs/others/assets/rsdoctor/bundled-code.png" height="300px" width="500px" style="margin:auto"/></div><!--/$-->]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Announcing Rsdoctor 0.1]]></title>
            <link>https://rsdoctor.rs/blog/release/release-note-0_1</link>
            <guid isPermaLink="false">/blog/release/release-note-0_1</guid>
            <pubDate>Wed, 24 Jan 2024 08:00:00 GMT</pubDate>
            <content:encoded><![CDATA[<!--$--><p><em>January 24, 2024</em></p>
<h1 class="rp-toc-include" id="announcing-rsdoctor-01"><a href="#announcing-rsdoctor-01" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Announcing Rsdoctor 0.1<!-- --> </h1><div class="rp-not-doc rp-llms-container"><button class="rp-not-doc rp-llms-button rp-llms-copy-button"><div class="rp-llms-copy-button__icon-wrapper"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-llms-copy-button__icon-success"><path fill="currentColor" d="m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" class="rp-llms-copy-button__icon-copy"><path fill="currentColor" d="M20 8v12H8V8zm0-2H8a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2"></path><path fill="currentColor" d="M4 16H2V4a2 2 0 0 1 2-2h12v2H4Z"></path></svg></div><span>Copy Markdown</span></button><button class="rp-llms-button rp-llms-view-options__trigger "><svg width="1em" height="1em" viewBox="0 0 32 32" class="rp-llms-view-options__arrow "><path fill="currentColor" d="M16 22 6 12l1.4-1.4 8.6 8.6 8.6-8.6L26 12z"></path></svg></button></div>
<picture><img alt="Rsdoctor Banner" src="https://github.com/web-infra-dev/rsdoctor/assets/7237365/0f9d2e86-d919-451a-befa-fa84603a87cf" style="margin:auto"/></picture>
<p>We are excited to announce the release of <a href="https://rsdoctor.rs/" target="_blank" rel="noopener noreferrer" class="rp-link">Rsdoctor</a> 0.1!</p>
<p>Rsdoctor is a one-stop build analyzer for Rspack and Webpack. It allows for detailed analysis of the build process and bundles, making the build process more visual and transparent.</p>
<h2 class="rp-toc-include" id="-position"><a href="#-position" class="rp-header-anchor rp-link" aria-hidden="true">#</a>📌 Position</h2>
<p><strong>Rsdoctor</strong> is a build analyzer for analyzing projects built with <a href="https://www.rspack.rs/" target="_blank" rel="noopener noreferrer" class="rp-link">Rspack</a> and <a href="https://webpack.js.org/" target="_blank" rel="noopener noreferrer" class="rp-link">Webpack</a>. It supports analysis of projects such as <a href="https://rsbuild.rs/" target="_blank" rel="noopener noreferrer" class="rp-link">Rsbuild</a>, <a href="https://create-react-app.dev/" target="_blank" rel="noopener noreferrer" class="rp-link">Create React App</a>, <a href="https://modernjs.dev/" target="_blank" rel="noopener noreferrer" class="rp-link">Modern.js</a>, and more.</p>
<p><img src="https://assets.rspack.rs/others/assets/rsdoctor/rsdoctor-position.png" alt="Position"/></p>
<h2 class="rp-toc-include" id="-features"><a href="#-features" class="rp-header-anchor rp-link" aria-hidden="true">#</a>🔥 Features</h2>
<ul>
<li><strong>Compilation Visualization</strong>: Rsdoctor visualizes the compilation behavior and time consumption, making it easy to view build issues.</li>
<li><strong>Multiple Analysis Capabilities</strong>: Rsdoctor supports build artifact, build-time analysis, and anti-degradation capabilities:<!-- -->
<ul>
<li>Build artifact support for resource lists and module dependencies, etc.</li>
<li>Build-time analysis supports Loader, Plugin, and Resolver building process analysis, including Rspack&#x27;s builtin loaders.</li>
<li>Build rules support duplicate package detection and ES Version Check, etc.</li>
<li>Currently, bundle diff capabilities are also available.</li>
</ul>
</li>
<li><strong>Support Custom Rules</strong>: In addition to built-in build scan rules, Rsdoctor also supports users adding custom component scan rules based on the build data of Rsdoctor.</li>
<li><strong>Framework-Independent</strong>: Rsdoctor support all projects built on Rspack or webpack.</li>
</ul>
<h2 class="rp-toc-include" id="️-introduction"><a href="#️-introduction" class="rp-header-anchor rp-link" aria-hidden="true">#</a>🛠️ Introduction</h2>
<h3 class="rp-toc-include" id="️-overview"><a href="#️-overview" class="rp-header-anchor rp-link" aria-hidden="true">#</a>⭐️ Overview</h3>
<ul>
<li>The overview page (i.e. the home page) can know <strong>project configuration, diagnostic information, compilation information, and product status</strong>.</li>
</ul>
<p><img src="https://assets.rspack.rs/others/assets/rsdoctor/project-overall-1.jpg" alt="Overall"/></p>
<ul>
<li>In addition to the project overview, we also provide diagnostic functions, including compilation diagnostics and duplicate packages diagnostics. If your compilation and products hit the diagnostic rules we defined,
the corresponding warning alerts will appear on the tool&#x27;s home page. <strong>where you can see the detailed reference path of duplicate packages</strong>:</li>
</ul>
<p><img src="https://assets.rspack.rs/others/assets/rsdoctor/overall-alerts.png" alt="Overall-Alerts"/></p>
<h3 class="rp-toc-include" id="️-compilation-analysis"><a href="#️-compilation-analysis" class="rp-header-anchor rp-link" aria-hidden="true">#</a>⭐️ Compilation analysis</h3>
<p>Provides corresponding data and analysis functions for <strong>Loaders, Plugins, and Module Resolve</strong> to help you analyze problems in the compilation process.</p>
<h4 class="rp-toc-include" id="loader-analysis"><a href="#loader-analysis" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Loader analysis</h4>
<ul>
<li>This module mainly provides the function of data analysis such as input and output, estimated time consumption, and parameters within <strong>Rspack or webpack Loaders</strong>.</li>
</ul>
<div style="display:flex"><img src="https://assets.rspack.rs/others/assets/rsdoctor/rsdoctor-loader-timeline.png" width="55%" style="margin:auto"/><img src="https://assets.rspack.rs/others/assets/rsdoctor/loader-analysis-all.png" width="45%" style="margin:auto"/></div>
<h4 class="rp-toc-include" id="plugin-analysis"><a href="#plugin-analysis" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Plugin analysis</h4>
<ul>
<li>This module mainly intercepts and collects data information such as the number of calls and estimated time consumption of Plugins.</li>
</ul>
<p><img alt="bundle" src="https://assets.rspack.rs/others/assets/rsdoctor/compile-plugin.jpg" width="600px" style="margin:auto"/></p>
<h4 class="rp-toc-include" id="resolve-analysis"><a href="#resolve-analysis" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Resolve analysis</h4>
<ul>
<li>This module mainly provides path data and estimated time consumption for module resolution in a single file within the project. Rspack does not currently support this module.</li>
</ul>
<p><img alt="bundle" src="https://assets.rspack.rs/others/assets/rsdoctor/resolver.png" width="700px" style="margin:auto"/></p>
<h3 class="rp-toc-include" id="️-product-analysis"><a href="#️-product-analysis" class="rp-header-anchor rp-link" aria-hidden="true">#</a>⭐️ Product analysis</h3>
<ul>
<li>
<p>In the <strong>Bundle Size</strong> page, we can see an overview of the product data information of the current project, as well as analyze the size and reasons for duplicate package imports.</p>
</li>
<li>
<p>In addition, we can also use the <strong>Bundle Analysis</strong> page to further analyze the relationship between the product and module in the current product, size data and other information, as well as the reasons for module introduction.</p>
</li>
</ul>
<p><img alt="bundle" src="https://assets.rspack.rs/others/assets/rsdoctor/bundle-size-overall.png" width="700px" style="margin:auto"/></p>
<h2 class="rp-toc-include" id="-quick-start"><a href="#-quick-start" class="rp-header-anchor rp-link" aria-hidden="true">#</a>📚 Quick start</h2>
<p>You can refer to the <a href="https://rsdoctor.rs/guide/start/quick-start" target="_blank" rel="noopener noreferrer" class="rp-link">Quick Start</a> to get started with <strong>Rsdoctor</strong>.</p>
<h2 class="rp-toc-include" id="-next-steps"><a href="#-next-steps" class="rp-header-anchor rp-link" aria-hidden="true">#</a>💡 Next steps</h2>
<p><strong>Improve Rsdoctor build analysis efficiency</strong>: Currently, enabling Rsdoctor plugin increases project build time. In the next step, we will extract and convert some of Rsdoctor&#x27;s build analysis logic into a rust plugin, built-in to <a href="https://www.rspack.rs/" target="_blank" rel="noopener noreferrer" class="rp-link">Rspack</a>, in order to improve Rsdoctor&#x27;s build analysis efficiency.</p>
<h2 class="rp-toc-include" id="acknowledgements"><a href="#acknowledgements" class="rp-header-anchor rp-link" aria-hidden="true">#</a>Acknowledgements</h2>
<p><strong>Rsdoctor</strong> has been inspired by outstanding projects in the community, and we would like to express our gratitude to them:</p>
<ul>
<li>Refer to the analysis logic of artifact relationships from <a href="https://github.com/relative-ci/bundle-stats/tree/master/packages/cli#readme" target="_blank" rel="noopener noreferrer" class="rp-link">bundle-stats</a>.</li>
<li>Refer to the module breakdown and analysis logic from <a href="https://github.com/webpack-contrib/webpack-bundle-analyzer" target="_blank" rel="noopener noreferrer" class="rp-link">webpack-bundle-analyzer</a>.</li>
<li><a href="https://github.com/statoscope/statoscope/blob/master/README.md" target="_blank" rel="noopener noreferrer" class="rp-link">Statoscope</a> is an excellent tool for analyzing build artifacts, and Rsdoctor is inspired by it in terms of build analysis.</li>
<li><a href="https://github.com/webpack/webpack/blob/main/README.md" target="_blank" rel="noopener noreferrer" class="rp-link">Webpack team and community</a> have created an excellent bundling tool and a rich ecosystem.</li>
<li><a href="https://github.com/antfu/vite-plugin-inspect" target="_blank" rel="noopener noreferrer" class="rp-link">vite-plugin-inspect</a> has inspired Rsdoctor&#x27;s exploration of build process analysis.</li>
</ul><!--/$-->]]></content:encoded>
        </item>
    </channel>
</rss>