@rsdoctor/docs 1.0.0-beta.2 → 1.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +1 -1
  2. package/docs/en/blog/release/release-note-0_1.mdx +8 -12
  3. package/docs/en/blog/release/release-note-0_3.mdx +2 -2
  4. package/docs/en/blog/release/release-note-0_4.mdx +4 -4
  5. package/docs/en/blog/topic/duplicate-pkg-problem.mdx +12 -13
  6. package/docs/en/blog/topic/loader-optimization.mdx +6 -6
  7. package/docs/en/config/options/options.mdx +53 -22
  8. package/docs/en/guide/more/faq.mdx +3 -3
  9. package/docs/en/guide/rules/rule-custom.mdx +3 -9
  10. package/docs/en/guide/rules/rules.mdx +22 -25
  11. package/docs/en/guide/start/cli.mdx +1 -1
  12. package/docs/en/guide/start/intro.mdx +16 -23
  13. package/docs/en/guide/start/quick-start-shared.mdx +2 -2
  14. package/docs/en/guide/start/quick-start.mdx +3 -3
  15. package/docs/en/guide/usage/bundle-alerts.mdx +2 -2
  16. package/docs/en/guide/usage/bundle-diff.mdx +9 -9
  17. package/docs/en/guide/usage/bundle-overall.mdx +3 -3
  18. package/docs/en/guide/usage/bundle-size.mdx +33 -17
  19. package/docs/en/guide/usage/compile-alerts.mdx +2 -2
  20. package/docs/en/guide/usage/compile-overall.mdx +13 -13
  21. package/docs/en/guide/usage/loaders-analysis.mdx +6 -6
  22. package/docs/en/guide/usage/loaders-timeline.mdx +5 -5
  23. package/docs/en/guide/usage/module-analysis.mdx +4 -4
  24. package/docs/en/guide/usage/plugins-analysis.mdx +2 -2
  25. package/docs/en/guide/usage/project-overall.mdx +4 -4
  26. package/docs/en/guide/usage/resolver.mdx +1 -1
  27. package/docs/en/guide/usage/rule-config.mdx +5 -5
  28. package/docs/zh/blog/release/release-note-0_1.mdx +8 -14
  29. package/docs/zh/blog/release/release-note-0_3.mdx +2 -2
  30. package/docs/zh/blog/release/release-note-0_4.mdx +4 -4
  31. package/docs/zh/blog/topic/duplicate-pkg-problem.mdx +10 -11
  32. package/docs/zh/blog/topic/loader-optimization.mdx +6 -6
  33. package/docs/zh/config/options/options.mdx +111 -82
  34. package/docs/zh/guide/more/faq.mdx +3 -3
  35. package/docs/zh/guide/rules/rule-custom.mdx +3 -9
  36. package/docs/zh/guide/rules/rules.mdx +11 -17
  37. package/docs/zh/guide/start/cli.mdx +1 -1
  38. package/docs/zh/guide/start/intro.mdx +9 -17
  39. package/docs/zh/guide/start/quick-start.mdx +2 -2
  40. package/docs/zh/guide/usage/bundle-alerts.mdx +1 -1
  41. package/docs/zh/guide/usage/bundle-diff.mdx +9 -9
  42. package/docs/zh/guide/usage/bundle-overall.mdx +3 -3
  43. package/docs/zh/guide/usage/bundle-size.mdx +25 -18
  44. package/docs/zh/guide/usage/compile-alerts.mdx +1 -1
  45. package/docs/zh/guide/usage/compile-overall.mdx +13 -13
  46. package/docs/zh/guide/usage/loaders-analysis.mdx +6 -6
  47. package/docs/zh/guide/usage/loaders-timeline.mdx +5 -5
  48. package/docs/zh/guide/usage/module-analysis.mdx +5 -4
  49. package/docs/zh/guide/usage/plugins-analysis.mdx +2 -2
  50. package/docs/zh/guide/usage/project-overall.mdx +4 -4
  51. package/docs/zh/guide/usage/resolver.mdx +1 -1
  52. package/docs/zh/guide/usage/rule-config.mdx +2 -2
  53. package/package.json +2 -2
  54. package/docs/public/bundle-alerts.png +0 -0
  55. package/docs/public/cross-chunks-package.png +0 -0
@@ -24,11 +24,11 @@
24
24
 
25
25
  - The overview page (i.e. the home page) can know **project configuration, diagnostic information, compilation information, and product status**.
26
26
 
27
- ![Overall](https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/start/overall.jpg)
27
+ ![Overall](https://assets.rspack.dev/others/assets/rsdoctor/project-overall-1.jpg)
28
28
 
29
29
  - 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's home page, **where you can see the detailed reference path of duplicate packages**:
30
30
 
31
- ![Overall-Alerts](https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/start/overall-alerts.jpg)
31
+ ![Overall-Alerts](https://assets.rspack.dev/others/assets/rsdoctor/overall-alerts.png)
32
32
 
33
33
  ### ⭐️ Compilation analysis
34
34
 
@@ -38,18 +38,15 @@ Provides corresponding data and analysis functions for **Loaders, Plugins, and M
38
38
 
39
39
  - This module mainly provides the function of data analysis such as input and output, estimated time consumption, and parameters within Rspack / Webpack Loaders.
40
40
 
41
- <div style={{ display: 'flex' }}>
42
- <img
43
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-timeline-overall.png"
44
- width="55%"
45
- style={{ margin: 'auto' }}
46
- />
47
- <img
48
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-anlaysis-all.png"
49
- width="45%"
50
- style={{ margin: 'auto' }}
51
- />
52
- </div>
41
+ <img
42
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-timeline-overall.png"
43
+ style={{ margin: 'auto' }}
44
+ />
45
+
46
+ <img
47
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-analysis-all.png"
48
+ style={{ margin: 'auto' }}
49
+ />
53
50
 
54
51
  #### Plugin analysis
55
52
 
@@ -58,9 +55,7 @@ Provides corresponding data and analysis functions for **Loaders, Plugins, and M
58
55
  <p>
59
56
  <img
60
57
  alt="bundle"
61
- src={
62
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/start/compile-plugin.jpg'
63
- }
58
+ src={'https://assets.rspack.dev/others/assets/rsdoctor/compile-plugin.jpg'}
64
59
  width="600px"
65
60
  style={{ margin: 'auto' }}
66
61
  />
@@ -73,9 +68,7 @@ Provides corresponding data and analysis functions for **Loaders, Plugins, and M
73
68
  <p>
74
69
  <img
75
70
  alt="bundle"
76
- src={
77
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/start/resolver.jpeg'
78
- }
71
+ src={'https://assets.rspack.dev/others/assets/rsdoctor/resolver.png'}
79
72
  width="700px"
80
73
  style={{ margin: 'auto' }}
81
74
  />
@@ -91,7 +84,7 @@ Provides corresponding data and analysis functions for **Loaders, Plugins, and M
91
84
  <img
92
85
  alt="bundle"
93
86
  src={
94
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/start/bundle-size.jpg'
87
+ 'https://assets.rspack.dev/others/assets/rsdoctor/bundle-size-overall.png'
95
88
  }
96
89
  width="700px"
97
90
  style={{ margin: 'auto' }}
@@ -106,8 +99,8 @@ Support in progress...
106
99
 
107
100
  Using the bundle diff function provided by Rsdoctor, you can see the changes in **the size of resources, duplicate packages, Packages and other data in the product**, as well as **the size of module files and code changes in each resource**.
108
101
 
109
- | ![bundle-diff-1](https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/start/bundle-diff-2.png) | ![bundle-diff-2](https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/start/bundle-diff-1.png) |
110
- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
102
+ | ![bundle-diff-1](https://assets.rspack.dev/others/assets/rsdoctor/bundle-diff-1.png) | ![bundle-diff-2](https://assets.rspack.dev/others/assets/rsdoctor/bundle-diff-2.png) |
103
+ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
111
104
 
112
105
  ## 🧑‍💻 Community
113
106
 
@@ -1,4 +1,4 @@
1
- ## Step 2: Register plugin
1
+ ## Step 2: register plugin
2
2
 
3
3
  After the dependency installation, you need to integrate the Rsdoctor plugin into your project. Below are some examples of common tools and frameworks:
4
4
 
@@ -141,7 +141,7 @@ export default defineConfig({
141
141
 
142
142
  ---
143
143
 
144
- ## Step 3: Run build
144
+ ## Step 3: run build
145
145
 
146
146
  Now, you can run the **build** command in the project. After the build is complete, Rsdoctor will automatically open the analysis page of this build.
147
147
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  This document will explain how to access the Rsdoctor ability.
4
4
 
5
- ## Step 1: Install dependencies
5
+ ## Step 1: install dependencies
6
6
 
7
7
  import { PackageManagerTabs } from '@theme';
8
8
 
@@ -15,10 +15,10 @@ For projects based on Rspack or Rsbuild, install the following dependencies:
15
15
  ### Webpack projects
16
16
 
17
17
  :::tip
18
- Not supported in Webpack 4.
18
+ Rsdoctor only supports webpack >= 5.
19
19
  :::
20
20
 
21
- For projects based on Webpack, install the following dependencies:
21
+ For projects based on webpack, install the following dependencies:
22
22
 
23
23
  <PackageManagerTabs command="add @rsdoctor/webpack-plugin -D" />
24
24
 
@@ -1,10 +1,10 @@
1
- # Bundle Alerts
1
+ # Bundle alerts
2
2
 
3
3
  ## Introduction
4
4
 
5
5
  The `Alerts` section in the `Overall` page is used to display the results of "Build Rules" and "Compilation Rules", as shown in the image below. In addition to being displayed on the page, the rules will also be displayed in the terminal log.
6
6
 
7
- <img src="/bundle-alerts.png" />
7
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-alerts.png" />
8
8
 
9
9
  You can check the built-in rules for bundle alerts below to understand the details of each rule.
10
10
 
@@ -21,7 +21,7 @@ First, you need to prepare **2 copies** of the [manifest.json](/config/options/t
21
21
 
22
22
  We plan to provide an online page for Bundle Diff analysis. You can upload **2 copies** of the [manifest.json](/config/options/term#manifestjson) produced by Rsdoctor on the page, one as the Baseline and the other as the Current. By clicking Start Diff, you can enter our analysis page.
23
23
 
24
- <img src="https://raw.githubusercontent.com/rspack-contrib/rstack-design-resources/51ae2fdf0635ebf52ef04a11f779314c64ef2fb6/others/assets/rsdoctor/bundle-diff.png" />
24
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-diff.png" />
25
25
 
26
26
  ## User guide
27
27
 
@@ -77,13 +77,13 @@ At the top of the page, we can see many data points composed of different cards,
77
77
  - **Modules** represents the number of modules in the two builds.
78
78
  - **Packages** represents the total number of NPM Packages in the two builds, as well as the number of new, deleted, and changed packages.
79
79
 
80
- <img src="https://raw.githubusercontent.com/rspack-contrib/rstack-design-resources/6c20c39a1dd576a513c2a7cb0fb0d2e162f63343/others/assets/rsdoctor/bundle-diff-cards.png" />
80
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-diff-cards.png" />
81
81
 
82
82
  #### Overview
83
83
 
84
84
  In the Overview module, we can see the **size**, **quantity**, and **change rate** of different **file types**.
85
85
 
86
- <img src="https://raw.githubusercontent.com/rspack-contrib/rstack-design-resources/6c20c39a1dd576a513c2a7cb0fb0d2e162f63343/others/assets/rsdoctor/bundle-diff-all.png" />
86
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-diff-all.png" />
87
87
 
88
88
  #### Assets
89
89
 
@@ -93,17 +93,17 @@ When displaying Asset names, Rsdoctor tries to remove the hash values from the b
93
93
 
94
94
  In the Assets module, we can see the **size** and **change rate** of the build files.
95
95
 
96
- <img src="https://raw.githubusercontent.com/rspack-contrib/rstack-design-resources/632e3087495b569de77a93235196fdacf09627d5/others/assets/rsdoctor/bundle-diff-assets-list.png" />
96
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-diff-assets-list.png" />
97
97
 
98
98
  By **clicking** the **"+" button** in front of the list items, you can expand to see the **list of modules** contained in the corresponding Asset (i.e., `Modules of "***"`), which shows the **size** and **change rate** of the modules.
99
99
 
100
- <img src="https://raw.githubusercontent.com/rspack-contrib/rstack-design-resources/632e3087495b569de77a93235196fdacf09627d5/others/assets/rsdoctor/bundle-diff-assets.png" />
100
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-diff-assets.png" />
101
101
 
102
102
  Rsdoctor is compatible with the situation where Assets files have **the same name but different hashes**. However, for Assets with **different names generated by splitting packages**, Rsdoctor cannot identify their comparison objects.
103
103
 
104
104
  Therefore, the Rsdoctor Assets module also provides a select component, allowing you to **manually select the Assets resources you want to compare**.
105
105
 
106
- <img src="https://raw.githubusercontent.com/rspack-contrib/rstack-design-resources/6c20c39a1dd576a513c2a7cb0fb0d2e162f63343/others/assets/rsdoctor/bundle-diff-select-assets.png" />
106
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-diff-select-assets.png" />
107
107
 
108
108
  #### Modules
109
109
 
@@ -113,7 +113,7 @@ The `New` / `Deleted` / `Changed` tags indicate whether the module is newly adde
113
113
 
114
114
  The `node_modules` tag indicates that the module's path contains `/node_modules/`.
115
115
 
116
- <img src="https://raw.githubusercontent.com/rspack-contrib/rstack-design-resources/632e3087495b569de77a93235196fdacf09627d5/others/assets/rsdoctor/bundle-diff-module-list.png" />
116
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-diff-module-list.png" />
117
117
 
118
118
  On the right side of the list items, you can view the module code changes by clicking the corresponding "View Changes" button.
119
119
 
@@ -122,10 +122,10 @@ On the right side of the list items, you can view the module code changes by cli
122
122
  - **Source Code: Source code data.** Available in `Normal` mode, not available in `Lite` mode, and not available in `Brief` mode.
123
123
  - **Bundled Code: Built code.** Available in `Normal` mode, available in `Lite` mode, and not available in `Brief` mode.
124
124
 
125
- <img src="https://raw.githubusercontent.com/rspack-contrib/rstack-design-resources/632e3087495b569de77a93235196fdacf09627d5/others/assets/rsdoctor/bundle-diff-module-changes.png" />
125
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-diff-module-changes.png" />
126
126
 
127
127
  #### Packages
128
128
 
129
129
  In the Packages module, we can see the **list of all NPM Packages** contained in the two builds. Each list item includes the **Package Name**, **Version**, and **Parsed Size** (final size after packaging).
130
130
 
131
- <img src="https://raw.githubusercontent.com/rspack-contrib/rstack-design-resources/632e3087495b569de77a93235196fdacf09627d5/others/assets/rsdoctor/bundle-diff-packages.png" />
131
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-diff-packages.png" />
@@ -5,7 +5,7 @@
5
5
  On the homepage of **Rsdoctor**, we can see a card called `Bundle Overall`, which provides information about the **build artifacts** of the current project. The content is shown in the following image:
6
6
 
7
7
  <img
8
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/overall/bundle-overall-1.jpg"
8
+ src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-overall-1.png"
9
9
  width="400px"
10
10
  height="500px"
11
11
  style={{ margin: 'auto' }}
@@ -36,7 +36,7 @@ On the homepage of **Rsdoctor**, we can see a card called `Bundle Overall`, whic
36
36
  - **Initial:** Refers to the Chunk being the main chunk of the entry.
37
37
 
38
38
  <img
39
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/overall/bundle-overall-files.png"
39
+ src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-overall-files.png"
40
40
  width="400px"
41
41
  height="600px"
42
42
  style={{ margin: 'auto' }}
@@ -47,7 +47,7 @@ On the homepage of **Rsdoctor**, we can see a card called `Bundle Overall`, whic
47
47
  If the `Duplicate Packages` number on the card is greater than 0, you can **click to view the details of the duplicate packages**. The content is shown in the following image:
48
48
 
49
49
  <img
50
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/overall/bundle-overall-dup-pkg.jpg"
50
+ src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-overall-dup-pkg.png"
51
51
  width="600px"
52
52
  style={{ margin: 'auto' }}
53
53
  />
@@ -8,7 +8,7 @@
8
8
  - **Bundle Analysis Module**: Analyzes the size and code information of the build artifacts' resources (**Assets**) and the included **Modules**. In this module, you can view the **actual code size of modules after packaging** in the Assets, as well as the original code or **packaged code segments** and **module reference relationships**.
9
9
 
10
10
  <img
11
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/bundle-size-overall.png"
11
+ src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-size-overall.png"
12
12
  width={'700px'}
13
13
  style={{ margin: 'auto' }}
14
14
  />
@@ -19,7 +19,7 @@ Click on the **"Bundle Size"** option in the navigation bar to view the Bundle a
19
19
 
20
20
  - **`Assets`**: Resources refer to images, fonts, media, and other file types. They are the files that ultimately exist in the output folder. Each Chunk has corresponding [Assets resources](https://webpack.js.org/concepts/under-the-hood/#chunks).
21
21
  - **`Module`**: One or more Modules combine to form a Chunk. For more information about Module types, please refer to [Rspack Modules](https://www.rspack.dev/api/modules.html) and [Webpack Modules](https://webpack.js.org/concepts/modules/#what-is-a-webpack-module).
22
- - **`Bundle Size`**: The final packaged size of the resource artifact, which is the final size after being processed by the builder.
22
+ - **`Bundle Size`**: The final packaged size of the resource artifact, which is the final size after being processed by the bundler.
23
23
  - **`Module Bundled Source & Size`**: **Module Parsed Source** refers to the final code fragment of the **Module** in the packaged artifact, and **Module Parsed Size** refers to the size of the final code fragment of the **Module** in the packaged artifact.
24
24
  - **`Package Count`**: The number of third-party packages.
25
25
  - **`Initial Chunk`**: The **initial** chunk is the main chunk of the entry point. This chunk contains all the modules specified by the entry point and their dependencies, unlike the **chunks** for "on-demand loading".
@@ -34,7 +34,7 @@ Click on the **"Bundle Size"** option in the navigation bar to view the Bundle a
34
34
  The bundle overview displays information about the number and size of files, such as `Total Files`. Clicking on the card chart expands the resource details, as shown in the following image:
35
35
 
36
36
  <img
37
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/bundle-size-overall-1.png"
37
+ src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-size-overall-1.png"
38
38
  width={'700px'}
39
39
  style={{ margin: 'auto' }}
40
40
  />
@@ -42,7 +42,7 @@ The bundle overview displays information about the number and size of files, suc
42
42
  - Clicking on the details icon displays the corresponding resource tree on the right, indicating the resource sizes:
43
43
 
44
44
  <img
45
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/bundle-size-tree.png"
45
+ src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-size-tree.png"
46
46
  width={'300px'}
47
47
  height={'400px'}
48
48
  style={{ margin: 'auto' }}
@@ -69,7 +69,7 @@ The **Bundle Analysis** module is used to analyze the size and code information
69
69
  - On the left side is the list of **Assets** resources, sorted in descending order by resource size. You can click the **"expand all"** button to expand all nodes.
70
70
  - On the right side is the list of **Modules** corresponding to the **Assets**, also sorted in descending order by module size after packaging.
71
71
 
72
- <img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/bundle-size-analysis-tree.png" />
72
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-size-analysis-tree.png" />
73
73
 
74
74
  ### Search and filter box
75
75
 
@@ -80,7 +80,24 @@ The top toolbar from left to right includes: the search tool for **Assets**, the
80
80
  - **Assets Size Filter Tool**: Enter a number with units of KB or MB to filter out **Assets** resources smaller than the specified size.
81
81
  - **Module Size Filter Tool**: Enter a number with units of KB or MB to filter out **Module** resources smaller than the specified size.
82
82
 
83
- <img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/bundle-size-analysis-selects.png" />
83
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-size-analysis-selects.png" />
84
+
85
+ #### Search module
86
+
87
+ Search for which Assets the Module is located in. As shown in the figure, you can see the results of matching the search Module keyword.
88
+
89
+ <img
90
+ style={{ margin: 'auto', width: 500, height: 400 }}
91
+ src="https://assets.rspack.dev/others/assets/rsdoctor/search-modules.png"
92
+ />
93
+
94
+ #### Search module
95
+
96
+ The module search functionality is supported, allowing users to click the "**Search Module**" button to open the module search dialog. By entering the module name, users can quickly locate and view the module's position in the Assets, making it easier to analyze the module's reference relationships and size. The search determines which Assets the Module is located in.
97
+
98
+ As shown in the following image, the results of matching the search Module keyword can be seen:
99
+
100
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/search-modules.png" />
84
101
 
85
102
  ### Module tag explanation
86
103
 
@@ -88,15 +105,15 @@ The **Assets** tag is shown in the left image, from left to right representing:
88
105
 
89
106
  <div style={{ display: 'flex' }}>
90
107
  <img
91
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/bundle-size-assets-tags.png"
108
+ src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-size-assets-tags.png"
92
109
  height="200px"
93
- width="360px"
110
+ width="260px"
94
111
  style={{ margin: 'auto' }}
95
112
  />
96
113
  <img
97
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/bundle-size-modules-tags.png"
114
+ src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-size-modules-tags.png"
98
115
  height="300px"
99
- width="440px"
116
+ width="340px"
100
117
  style={{ margin: 'auto' }}
101
118
  />
102
119
  </div>
@@ -116,7 +133,7 @@ The **Modules** tag is shown in the right image, from left to right representing
116
133
  Click the **"Bundle Analyzer Graph"** button on the **"Bundle Size"** page to view the classic tile graph.
117
134
 
118
135
  <img
119
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/bundle-size-tile-graph.png"
136
+ src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-size-tile-graph.png"
120
137
  width="500px"
121
138
  style={{ margin: 'auto' }}
122
139
  />
@@ -132,17 +149,16 @@ The added code segment will affect the analysis capability of the bundle.
132
149
 
133
150
  Rsdoctor is compatible with the logic of adding code using the BannerPlugin, but it is not enabled by default because Rsdoctor needs to add tag code. The Rsdoctor BannerPlugin capability is enabled in the following two cases:
134
151
 
135
- 1. The project uses the BannerPlugin in `rspack.config.j|ts` or `webpack.config.j|ts`.
152
+ 1. The project uses the BannerPlugin in `rspack.config.(js|ts)` or `webpack.config.(js|ts)`.
136
153
 
137
154
  2. Enable Rsdoctor BannerPlugin capability through Rsdoctor options by setting `supports.banner`:
138
155
 
139
156
  ```ts
140
- new RsdoctorRspackPlugin (
157
+ new RsdoctorRspackPlugin({
141
158
  supports: {
142
- banner: true
143
- }
144
- )
145
-
159
+ banner: true,
160
+ },
161
+ });
146
162
  ```
147
163
 
148
164
  - Note: Enabling `drop_console` will affect Rsdoctor's analysis of the BannerPlugin. Therefore, you can disable `drop_console` when `RSDOCTOR = true`.
@@ -1,8 +1,8 @@
1
- # Compile Alerts
1
+ # Compile alerts
2
2
 
3
3
  We have integrated some capabilities based on compilation data detection. If the current compilation result contains data that hits the rules we define, the `Compile Alerts` module will appear at the bottom of the **Rsdoctor** main interface, as shown in the image below:
4
4
 
5
- <img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/compile-alerts.png" />
5
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/compile-alerts.png" />
6
6
 
7
7
  This module allows us to visually see some warning information about our project's compilation, which can help us further optimize the project's compilation performance.
8
8
 
@@ -5,7 +5,7 @@
5
5
  On the homepage of **Rsdoctor**, there is a card called `Compile Overall` that provides information about the **compilation process** of the current project. The content is shown in the following image:
6
6
 
7
7
  <img
8
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/overall/compile-overall-1.jpg"
8
+ src="https://assets.rspack.dev/others/assets/rsdoctor/compile-overall-1.jpg"
9
9
  width="400px"
10
10
  height="600px"
11
11
  style={{ margin: 'auto' }}
@@ -19,12 +19,12 @@ For each compilation phase, if the time data is displayed in <u>blue</u>, it mea
19
19
 
20
20
  The following table explains the meaning and code implementation of each phase in the card:
21
21
 
22
- | Phase Name | Description | Code Implementation |
23
- | ---------------------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
24
- | <b><i>Bootstrap -> BeforeCompile</i></b> | Represents the time taken from project startup to before compilation starts | <ul><li>In `Webpack` or `Rspack` projects: Reports [process.uptime()](https://nodejs.org/dist/latest-v18.x/docs/api/process.html#processuptime) as the <b>duration</b> when **compiler.hooks.beforeCompile** is called</li></ul> |
25
- | <b><i>Compile</i></b> | Represents the total time taken for the project compilation | <ul><li>In `Webpack` or `Rspack` projects: The <b>start time</b> is the time when **compiler.hooks.beforeCompile** is called, and the <b>end time</b> is the time when **compiler.hooks.afterCompile** is called</li></ul> |
26
- | <b><i>AfterCompile -> Done</i></b> | Represents the time taken from compilation completion to the end of the entire process | <ul><li>In `Webpack` or `Rspack` projects: The <b>start time</b> is the time when **compiler.hooks.afterCompile** is called, and the <b>end time</b> is the time when **compiler.hooks.done** is called</li></ul> |
27
- | <b><i>Minify</i></b> | Represents the time taken for file compression during the compilation process in most cases | <ul><li>In `Webpack` or `Rspack` projects: Calculates the sum of the time taken for each call of **compilation.hooks.optimizeChunkAssets** and **compilation.hooks.processAssets**</li></ul> |
22
+ | Phase Name | Description | Code Implementation |
23
+ | ---------------------------------------- | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
24
+ | <b><i>Bootstrap -> BeforeCompile</i></b> | Represents the time taken from project startup to before compilation starts | <ul><li>Reports [process.uptime()](https://nodejs.org/dist/latest-v22.x/docs/api/process.html#processuptime) as the <b>duration</b> when **compiler.hooks.beforeCompile** is called</li></ul> |
25
+ | <b><i>Compile</i></b> | Represents the total time taken for the project compilation | <ul><li>The <b>start time</b> is the time when **compiler.hooks.beforeCompile** is called, and the <b>end time</b> is the time when **compiler.hooks.afterCompile** is called</li></ul> |
26
+ | <b><i>AfterCompile -> Done</i></b> | Represents the time taken from compilation completion to the end of the entire process | <ul><li>The <b>start time</b> is the time when **compiler.hooks.afterCompile** is called, and the <b>end time</b> is the time when **compiler.hooks.done** is called</li></ul> |
27
+ | <b><i>Minify</i></b> | Represents the time taken for file compression during the compilation process in most cases | <ul><li>Calculates the sum of the time taken for each call of **compilation.hooks.optimizeChunkAssets** and **compilation.hooks.processAssets**</li></ul> |
28
28
 
29
29
  ## Usage instructions
30
30
 
@@ -33,7 +33,7 @@ The following table explains the meaning and code implementation of each phase i
33
33
  By **clicking on the data of the `Bootstrap -> BeforeCompile` phase**, a popup will appear on the page, as shown in the following image:
34
34
 
35
35
  <img
36
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/overall/compile-overall-boostrap.jpg"
36
+ src="https://assets.rspack.dev/others/assets/rsdoctor/compile-overall-boostrap.jpg"
37
37
  width="600px"
38
38
  style={{ margin: 'auto' }}
39
39
  />
@@ -56,12 +56,12 @@ Hovering over a data point in the chart will display the following information i
56
56
 
57
57
  In this section, you can navigate to "Compile Analysis" -> "Loader Analysis" -> [**"Loader Timeline"**](./loaders-timeline.mdx) in the navigation bar to view the timeline of loader compilation time.
58
58
 
59
- ### AfterCompile -> Done details
59
+ ### AfterCompile -> done details
60
60
 
61
61
  By **clicking on the data of the `AfterCompile -> Done` phase**, a popup will appear on the page, as shown in the following image:
62
62
 
63
63
  <img
64
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/overall/compile-overall-aftercompile-1.jpg"
64
+ src="https://assets.rspack.dev/others/assets/rsdoctor/compile-overall-aftercompile-1.jpg"
65
65
  width="600px"
66
66
  height="400px"
67
67
  style={{ margin: 'auto' }}
@@ -77,7 +77,7 @@ The popup mainly contains a data table that shows the relevant data of the calls
77
77
  Scrolling down the page will show the corresponding chart:
78
78
 
79
79
  <img
80
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/overall/compile-overall-aftercompile-2.jpg"
80
+ src="https://assets.rspack.dev/others/assets/rsdoctor/compile-overall-aftercompile-2.jpg"
81
81
  width="600px"
82
82
  style={{ margin: 'auto' }}
83
83
  />
@@ -104,8 +104,8 @@ Minify details are currently not available for Rspack projects.
104
104
 
105
105
  By **clicking on the data of the `Minify` phase**, a popup will appear on the page, as shown in the following images:
106
106
 
107
- | <img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/overall/compile-overall-minify-1.jpg" /> | <img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/overall/compile-overall-minify-2.jpg" /> |
108
- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
107
+ | <img src="https://assets.rspack.dev/others/assets/rsdoctor/compile-overall-minify-1.jpg" /> | <img src="https://assets.rspack.dev/others/assets/rsdoctor/compile-overall-minify-2.jpg" /> |
108
+ | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
109
109
 
110
110
  The content in the popup has similar meanings to the previous paragraphs, so it will not be repeated here.
111
111
 
@@ -9,7 +9,7 @@ Click on the navigation bar **"Compile Analysis"** -> **"Loader Analysis"** opti
9
9
  Firstly, in this module, you can directly see the file tree structure of all files processed by Loaders, as shown in the following image:
10
10
 
11
11
  <img
12
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-anlaysis-all.png"
12
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-analysis-all.png"
13
13
  width="600px"
14
14
  style={{ margin: 'auto' }}
15
15
  />
@@ -28,7 +28,7 @@ The corresponding details will be explained in the following paragraphs.
28
28
  By **clicking on a selected directory**, you can see the **time statistics of all Loaders in the selected directory** ([estimated time consumption](../../guide/more/faq#loader-time-consuming-data-is-inaccurate)) on the right side of the file tree. The content of the "Statistics of \*\*\*" card is shown in the following image:
29
29
 
30
30
  <img
31
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-anlaysis-table.png"
31
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-analysis-table.png"
32
32
  width="300px"
33
33
  height="400px"
34
34
  style={{ margin: 'auto' }}
@@ -52,18 +52,18 @@ By **clicking on a file**, a modal will appear with the following content:
52
52
  - "**Right section**": Information about the **input, output**, and **parameter data** of the selected Loader at the time of invocation.
53
53
 
54
54
  <img
55
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-analysis-code-change.png"
55
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-analysis-code-change.png"
56
56
  width="600px"
57
57
  style={{ margin: 'auto' }}
58
- />{' '}
58
+ />
59
59
 
60
60
  - **Parameter Data**: Click on "**show more**" or the expand button in the top left corner to view the corresponding parameter information.
61
61
 
62
62
  <img
63
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-analysis-options.png"
63
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-analysis-options.png"
64
64
  width="600px"
65
65
  style={{ margin: 'auto' }}
66
- />{' '}
66
+ />
67
67
 
68
68
  As shown in the image, we can obtain the following information about the **target file**:
69
69
 
@@ -5,7 +5,7 @@
5
5
  By clicking on the "Compile Analysis" -> "Loader Analysis" option in the navigation bar of **Rsdoctor**, we can see the **execution timeline** of all loaders in the current project. Please note that this page requires the `loader` analysis capability to be enabled in order to display the [features](/config/options/options). The content of this page is shown in the following image:
6
6
 
7
7
  <img
8
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-timeline-overall.png"
8
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-timeline-overall.png"
9
9
  width="700"
10
10
  style={{ margin: 'auto' }}
11
11
  />
@@ -34,7 +34,7 @@ In the **Loaders Timeline**, the **left Y-axis** represents the **loader names**
34
34
  There are two selector at the top of the page, where you can enter the **Loaders** or **Files** you want to filter, and the timeline chart will be displayed based on the filtered content.
35
35
 
36
36
  <img
37
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-timeline-overall.png"
37
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-timeline-overall.png"
38
38
  width="700"
39
39
  style={{ margin: 'auto' }}
40
40
  />
@@ -44,7 +44,7 @@ There are two selector at the top of the page, where you can enter the **Loaders
44
44
  If we want to view the **summary of all data** for a single loader, we can hover over the position shown in the following image:
45
45
 
46
46
  <img
47
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-timeline-loader-timeline.png"
47
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-timeline-loader-timeline.png"
48
48
  width="700"
49
49
  style={{ margin: 'auto' }}
50
50
  />
@@ -52,7 +52,7 @@ If we want to view the **summary of all data** for a single loader, we can hover
52
52
  At this point, we can see the **summary of all invocations** within a single loader (refer to the [Glossary](#glossary) for field definitions), as shown in the following image:
53
53
 
54
54
  <img
55
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-timeline-loader-card.png"
55
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-timeline-loader-card.png"
56
56
  width="700"
57
57
  style={{ margin: 'auto' }}
58
58
  />
@@ -62,7 +62,7 @@ At this point, we can see the **summary of all invocations** within a single loa
62
62
  If we want to view the **information of a single invocation** for a loader, we can hover over any **colored stripe** within the position shown in the following image. At this point, we can see the **information of the current invocation** within a single loader (refer to the [Glossary](#glossary) for field definitions), as shown in the following image:
63
63
 
64
64
  <img
65
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-timeline-loader-file.png"
65
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-timeline-loader-file.png"
66
66
  width="700"
67
67
  style={{ margin: 'auto' }}
68
68
  />
@@ -7,7 +7,7 @@
7
7
  In this section, you can analyze the imported chain of a module. If you have the need to split the package or want to see why a certain module is being imported, you can quickly and clearly locate the reference chain through the `Module Imported Chain Analysis`.
8
8
 
9
9
  <img
10
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/module-analysis-tree.png"
10
+ src="https://assets.rspack.dev/others/assets/rsdoctor/module-analysis-tree.png"
11
11
  width="600px"
12
12
  style={{ margin: 'auto' }}
13
13
  />
@@ -17,7 +17,7 @@ In this section, you can analyze the imported chain of a module. If you have the
17
17
  Clicking on an **Assets** in the **[Bundle Size](./bundle-size)** page will display the `「Module Tree」` on the right side. Each **Module** will have the following icon next to it, click on it to view the imported chain of that **Module**.
18
18
 
19
19
  <img
20
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/module-analysis-entry.png"
20
+ src="https://assets.rspack.dev/others/assets/rsdoctor/module-analysis-entry.png"
21
21
  height="300px"
22
22
  width="440px"
23
23
  style={{ margin: 'auto' }}
@@ -37,7 +37,7 @@ The `Reasons Tree` displays the dependency chain of this `Module`, showing which
37
37
  - **Parent-child relationship in the dependency tree**: The parent node file is the one that is depended upon by the child node file and is therefore bundled into the output. Similarly, the grandchild node file is depended upon by the child node and is bundled into the output, and so on.
38
38
 
39
39
  <img
40
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/module-analysis-jump-icon.png"
40
+ src="https://assets.rspack.dev/others/assets/rsdoctor/module-analysis-jump-icon.png"
41
41
  width="700px"
42
42
  style={{ margin: 'auto' }}
43
43
  />
@@ -52,7 +52,7 @@ The `Reasons Tree` displays the dependency chain of this `Module`, showing which
52
52
  - The `!` tag, hover over it to display the detailed path of the module.
53
53
 
54
54
  <img
55
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/module-analysis-icons.png"
55
+ src="https://assets.rspack.dev/others/assets/rsdoctor/module-analysis-icons.png"
56
56
  width="600px"
57
57
  style={{ margin: 'auto' }}
58
58
  />
@@ -5,7 +5,7 @@
5
5
  In the **Rsdoctor** `Compile Analysis` secondary page `Plugins Analysis`, we can see the invocation data of all **Compiler Hooks** and **Compilation Hooks** used by the current Rspack or Webpack project. The content is shown in the following figure:
6
6
 
7
7
  <img
8
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/plugins-analysis-overall.png"
8
+ src="https://assets.rspack.dev/others/assets/rsdoctor/plugins-analysis-overall.png"
9
9
  width={'600px'}
10
10
  style={{ margin: 'auto' }}
11
11
  />
@@ -32,7 +32,7 @@ The meanings of the fields in the data statistics table on the page are as follo
32
32
  If we need to view the Rspack or Webpack configuration of the project, we can click on `View Bundler Config` in the upper right corner of the card. A floating layer will pop up, which contains the serialized **Bundler Config**, as shown in the following figure:
33
33
 
34
34
  <img
35
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/plugins-analysis-config.png"
35
+ src="https://assets.rspack.dev/others/assets/rsdoctor/plugins-analysis-config.png"
36
36
  width={'400px'}
37
37
  style={{ margin: 'auto' }}
38
38
  />