@rsdoctor/docs 1.0.0-beta.1 → 1.0.0-beta.3

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/docs/en/blog/release/release-note-0_1.mdx +8 -12
  2. package/docs/en/blog/release/release-note-0_3.mdx +4 -4
  3. package/docs/en/blog/release/release-note-0_4.mdx +4 -4
  4. package/docs/en/blog/topic/duplicate-pkg-problem.mdx +1 -1
  5. package/docs/en/blog/topic/loader-optimization.mdx +6 -6
  6. package/docs/en/config/options/options.mdx +98 -45
  7. package/docs/en/guide/_meta.json +2 -2
  8. package/docs/en/guide/more/faq.mdx +6 -6
  9. package/docs/en/guide/rules/_meta.json +1 -0
  10. package/docs/en/guide/{custom → rules}/rule-custom.mdx +3 -9
  11. package/docs/en/guide/rules/rules.mdx +278 -0
  12. package/docs/en/guide/start/intro.mdx +16 -23
  13. package/docs/en/guide/usage/bundle-alerts.mdx +9 -40
  14. package/docs/en/guide/usage/bundle-diff.mdx +9 -9
  15. package/docs/en/guide/usage/bundle-overall.mdx +3 -3
  16. package/docs/en/guide/usage/bundle-size.mdx +27 -10
  17. package/docs/en/guide/usage/compile-alerts.mdx +7 -7
  18. package/docs/en/guide/usage/compile-overall.mdx +6 -6
  19. package/docs/en/guide/usage/loaders-analysis.mdx +6 -6
  20. package/docs/en/guide/usage/loaders-timeline.mdx +5 -5
  21. package/docs/en/guide/usage/module-analysis.mdx +4 -4
  22. package/docs/en/guide/usage/plugins-analysis.mdx +2 -2
  23. package/docs/en/guide/usage/project-overall.mdx +3 -3
  24. package/docs/en/guide/usage/resolver.mdx +1 -1
  25. package/docs/en/guide/usage/rule-config.mdx +17 -93
  26. package/docs/zh/blog/release/release-note-0_1.mdx +8 -14
  27. package/docs/zh/blog/release/release-note-0_3.mdx +4 -4
  28. package/docs/zh/blog/release/release-note-0_4.mdx +4 -4
  29. package/docs/zh/blog/topic/duplicate-pkg-problem.mdx +1 -1
  30. package/docs/zh/blog/topic/loader-optimization.mdx +6 -6
  31. package/docs/zh/config/options/options.mdx +101 -50
  32. package/docs/zh/guide/_meta.json +2 -2
  33. package/docs/zh/guide/more/faq.mdx +6 -6
  34. package/docs/zh/guide/rules/_meta.json +1 -0
  35. package/docs/zh/guide/{custom → rules}/rule-custom.mdx +3 -9
  36. package/docs/zh/guide/rules/rules.mdx +275 -0
  37. package/docs/zh/guide/start/intro.mdx +9 -17
  38. package/docs/zh/guide/usage/bundle-alerts.mdx +8 -40
  39. package/docs/zh/guide/usage/bundle-diff.mdx +9 -9
  40. package/docs/zh/guide/usage/bundle-overall.mdx +3 -3
  41. package/docs/zh/guide/usage/bundle-size.mdx +18 -10
  42. package/docs/zh/guide/usage/compile-alerts.mdx +3 -3
  43. package/docs/zh/guide/usage/compile-overall.mdx +6 -6
  44. package/docs/zh/guide/usage/loaders-analysis.mdx +6 -6
  45. package/docs/zh/guide/usage/loaders-timeline.mdx +5 -5
  46. package/docs/zh/guide/usage/module-analysis.mdx +5 -4
  47. package/docs/zh/guide/usage/plugins-analysis.mdx +2 -2
  48. package/docs/zh/guide/usage/project-overall.mdx +3 -3
  49. package/docs/zh/guide/usage/resolver.mdx +2 -2
  50. package/docs/zh/guide/usage/rule-config.mdx +13 -90
  51. package/package.json +2 -2
  52. package/docs/en/guide/custom/_meta.json +0 -1
  53. package/docs/zh/guide/custom/_meta.json +0 -1
  54. /package/docs/en/guide/{custom → rules}/upload-data.mdx +0 -0
  55. /package/docs/zh/guide/{custom → rules}/upload-data.mdx +0 -0
@@ -16,7 +16,7 @@ Rsdoctor is a one-stop build analysis tool for Rspack and Webpack. It allows for
16
16
 
17
17
  **Rsdoctor** is a build analysis tool for analyzing projects built with [Rspack](https://www.rspack.dev/) and [Webpack](https://webpack.js.org/). It supports analysis of projects such as [Rsbuild](https://rsbuild.dev/), [Create React App](https://create-react-app.dev/), [Modern.js](https://modernjs.dev/), and more.
18
18
 
19
- ![Position](https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/rsdoctor-position.png)
19
+ ![Position](https://assets.rspack.dev/others/assets/rsdoctor/rsdoctor-position.png)
20
20
 
21
21
  ## 🔥 Features
22
22
 
@@ -35,12 +35,12 @@ Rsdoctor is a one-stop build analysis tool for Rspack and Webpack. It allows for
35
35
 
36
36
  - The overview page (i.e. the home page) can know **project configuration, diagnostic information, compilation information, and product status**.
37
37
 
38
- ![Overall](https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/start/overall.jpg)
38
+ ![Overall](https://assets.rspack.dev/others/assets/rsdoctor/project-overall-1.jpg)
39
39
 
40
40
  - 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,
41
41
  the corresponding warning alerts will appear on the tool's home page. **where you can see the detailed reference path of duplicate packages**:
42
42
 
43
- ![Overall-Alerts](https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/start/overall-alerts.jpg)
43
+ ![Overall-Alerts](https://assets.rspack.dev/others/assets/rsdoctor/overall-alerts.png)
44
44
 
45
45
  ### ⭐️ Compilation analysis
46
46
 
@@ -52,12 +52,12 @@ Provides corresponding data and analysis functions for **Loaders, Plugins, and M
52
52
 
53
53
  <div style={{ display: 'flex' }}>
54
54
  <img
55
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-timeline-overall.png"
55
+ src="https://assets.rspack.dev/others/assets/rsdoctor/rsdoctor-loader-timeline.png"
56
56
  width="55%"
57
57
  style={{ margin: 'auto' }}
58
58
  />
59
59
  <img
60
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-anlaysis-all.png"
60
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-analysis-all.png"
61
61
  width="45%"
62
62
  style={{ margin: 'auto' }}
63
63
  />
@@ -70,9 +70,7 @@ Provides corresponding data and analysis functions for **Loaders, Plugins, and M
70
70
  <p>
71
71
  <img
72
72
  alt="bundle"
73
- src={
74
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/start/compile-plugin.jpg'
75
- }
73
+ src={'https://assets.rspack.dev/others/assets/rsdoctor/compile-plugin.jpg'}
76
74
  width="600px"
77
75
  style={{ margin: 'auto' }}
78
76
  />
@@ -85,9 +83,7 @@ Provides corresponding data and analysis functions for **Loaders, Plugins, and M
85
83
  <p>
86
84
  <img
87
85
  alt="bundle"
88
- src={
89
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/start/resolver.jpeg'
90
- }
86
+ src={'https://assets.rspack.dev/others/assets/rsdoctor/resolver.png'}
91
87
  width="700px"
92
88
  style={{ margin: 'auto' }}
93
89
  />
@@ -103,7 +99,7 @@ Provides corresponding data and analysis functions for **Loaders, Plugins, and M
103
99
  <img
104
100
  alt="bundle"
105
101
  src={
106
- 'https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/start/bundle-size.jpg'
102
+ 'https://assets.rspack.dev/others/assets/rsdoctor/bundle-size-overall.png'
107
103
  }
108
104
  width="700px"
109
105
  style={{ margin: 'auto' }}
@@ -13,9 +13,9 @@ The new features of Rsdoctor v0.3 include:
13
13
  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.
14
14
  External extension interfaces need to be configured on the Rsdoctor plugin through the `extends` field, and their configurations are also placed in the `rules` field.
15
15
 
16
- For more details, please refer to: [Custom Extension Rules](/guide/custom/rule-custom)
16
+ For more details, please refer to: [Custom Extension Rules](/guide/rules/rule-custom)
17
17
 
18
- Additionally, the use of custom rules can also be applied for user data collection and reporting. [Data Reporting](/guide/custom/upload-data)
18
+ Additionally, the use of custom rules can also be applied for user data collection and reporting. [Data Reporting](/guide/rules/upload-data)
19
19
 
20
20
  - Example:
21
21
 
@@ -123,14 +123,14 @@ Disabling the Parse Bundle capability only affects the ability to view the final
123
123
 
124
124
  <div style={{ display: 'flex' }}>
125
125
  <img
126
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/bundled-size.jpeg"
126
+ src="https://assets.rspack.dev/others/assets/rsdoctor/bundled-size.jpeg"
127
127
  height="300px"
128
128
  width="400px"
129
129
  style={{ margin: 'auto' }}
130
130
  />
131
131
 
132
132
  <img
133
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/bundled-code.png"
133
+ src="https://assets.rspack.dev/others/assets/rsdoctor/bundled-code.png"
134
134
  height="300px"
135
135
  width="500px"
136
136
  style={{ margin: 'auto' }}
@@ -36,11 +36,11 @@ The **Bundle Diff** feature helps users compare and analyze changes between two
36
36
 
37
37
  <div style={{ display: 'flex', justifyContent: 'space-between' }}>
38
38
  <img
39
- src="https://raw.githubusercontent.com/rspack-contrib/rstack-design-resources/6c20c39a1dd576a513c2a7cb0fb0d2e162f63343/others/assets/rsdoctor/bundle-diff-cards.png"
39
+ src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-diff-cards.png"
40
40
  style={{ width: '48%' }}
41
41
  />
42
42
  <img
43
- src="https://raw.githubusercontent.com/rspack-contrib/rstack-design-resources/632e3087495b569de77a93235196fdacf09627d5/others/assets/rsdoctor/bundle-diff-module-list.png"
43
+ src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-diff-module-list.png"
44
44
  style={{ width: '48%' }}
45
45
  />
46
46
  </div>
@@ -57,7 +57,7 @@ Plans to support Bundle Diff Action on GitHub to simplify degradation monitoring
57
57
 
58
58
  Support for loader analysis for Vue projects has been added in Rsdoctor v0.4.
59
59
 
60
- <img src="https://raw.githubusercontent.com/rspack-contrib/rstack-design-resources/d8074588e99dbdcaa278cd1e82f1298663e425db/others/assets/rsdoctor/vue-loader.png" />
60
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/vue-loader.png" />
61
61
 
62
62
  ## Other features
63
63
 
@@ -67,7 +67,7 @@ Support for loader analysis for Vue projects has been added in Rsdoctor v0.4.
67
67
  - Reduced the size of the `@rsdoctor/client` package by 60%, improving page rendering speed.
68
68
 
69
69
  <img
70
- src="https://raw.githubusercontent.com/rspack-contrib/rstack-design-resources/34e6d96d6948a08cade4bd419f50b962e228a4a8/others/assets/rsdoctor/package-size-diff.png"
70
+ src="https://assets.rspack.dev/others/assets/rsdoctor/package-size-diff.png"
71
71
  style={{ width: '60%', margin: 'auto' }}
72
72
  />
73
73
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Rsdoctor will report cases where multiple duplicate dependencies exist in the same builder's artifact.
4
4
 
5
- <img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/bundle-alerts.png" />
5
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-alerts.png" />
6
6
 
7
7
  ## Hazards of duplicate packages
8
8
 
@@ -16,7 +16,7 @@ Regardless of the optimization method used for loaders, we need to obtain data i
16
16
  With the Loader Analysis module provided by Rsdoctor, we can see **a tree structure composed of all files that pass through the loaders during the entire compilation process**, as shown in the following figure:
17
17
 
18
18
  <img
19
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-anlaysis-all.png"
19
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-analysis-all.png"
20
20
  width="600px"
21
21
  style={{ margin: 'auto' }}
22
22
  />
@@ -26,7 +26,7 @@ With the Loader Analysis module provided by Rsdoctor, we can see **a tree struct
26
26
  By **clicking on a directory**, you can see the **time-consuming statistics of all loaders** under the currently **selected directory** on the right side of the file tree, such as the number of files processed by a loader and **the estimated time** consumption. The content of the "Statistics of \*\*\*" card is shown in the following figure:
27
27
 
28
28
  <img
29
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-anlaysis-table.png"
29
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-analysis-table.png"
30
30
  width="300px"
31
31
  height="400px"
32
32
  style={{ margin: 'auto' }}
@@ -43,18 +43,18 @@ Usually, in the directories of third-party libraries inside **`node_modules`**,
43
43
  By **clicking on a file**, a mask layer will pop up, showing a list of all loaders that have been executed on the currently clicked file. By **clicking on a loader**, you can see the **input**, **output**, and **parameter data information of the target loader** when it is called.
44
44
 
45
45
  <img
46
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-analysis-code-change.png"
46
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-analysis-code-change.png"
47
47
  width="600px"
48
48
  style={{ margin: 'auto' }}
49
- />{' '}
49
+ />
50
50
 
51
51
  - Parameter Data Information: Click on "**show more**" or the expand button in the upper left corner to view the corresponding parameter information.
52
52
 
53
53
  <img
54
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-analysis-options.png"
54
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-analysis-options.png"
55
55
  width="600px"
56
56
  style={{ margin: 'auto' }}
57
- />{' '}
57
+ />
58
58
 
59
59
  We can use the loader information of individual files here to troubleshoot issues and decide whether to add them to [module.rule.exclude](https://webpack.js.org/configuration/module/#ruleexclude).
60
60
 
@@ -74,8 +74,36 @@ new RsdoctorWebpackPlugin({
74
74
 
75
75
  This is the options for the [RsdoctorWebpackPlugin](#rsdoctorwebpackplugin) and [RsdoctorRspackPlugin](#rsdoctorrspackplugin). It contains these properties:
76
76
 
77
+ - [brief](#brief)
77
78
  - [disableClientServer](#disableclientserver)
79
+ - [experiments](#experiments)
78
80
  - [features](#features)
81
+ - [mode](#mode)
82
+ - [output](#output)
83
+ - [port](#port)
84
+ - [supports](#supports)
85
+
86
+ ### brief
87
+
88
+ <Badge text="Version: 0.4.0" type="warning" />
89
+
90
+ - **Type:** [BriefType](#brieftype)
91
+ - **Optional:** `true`
92
+ - **Default:** undefined
93
+
94
+ More configurations for Brief mode are as follows:
95
+
96
+ - **reportHtmlName:** Configures the name of the HTML report for Brief mode. The default value is `report-rsdoctor.html`.
97
+ - **writeDataJson:** By default, in Brief mode, the analysis data is injected into the HTML file, so no additional build analysis data is generated. If you want to generate additional local data, you need to configure `writeDataJson: true`.
98
+
99
+ #### briefType
100
+
101
+ ```ts
102
+ interface BriefConfig {
103
+ reportHtmlName?: string | undefined;
104
+ writeDataJson: boolean;
105
+ }
106
+ ```
79
107
 
80
108
  ### disableClientServer
81
109
 
@@ -85,6 +113,30 @@ This is the options for the [RsdoctorWebpackPlugin](#rsdoctorwebpackplugin) and
85
113
 
86
114
  Whether to automatically open the Rsdoctor report page. If you do not need to view the analysis report provided by Rsdoctor in the browser, you can enable this configuration item.
87
115
 
116
+ ### experiments
117
+
118
+ <Badge text="Version: 1.0.0" type="warning" />
119
+
120
+ #### enableNativePlugin
121
+
122
+ - Type: `boolean`
123
+ - Optional: true
124
+ - Default: false
125
+
126
+ ##### Description
127
+
128
+ By integrating Rsdoctor's native plugin into Rspack, we move Rsdoctor's time-consuming data processing logic to the Rspack build stage. This feature significantly improves the build analysis efficiency of Rsdoctor in Rspack, reducing the overall analysis time.
129
+
130
+ - enableNativePlugin: Whether to enable the Rspack native plugin, enabling it can significantly reduce the analysis time of Rsdoctor itself.
131
+
132
+ - Example
133
+
134
+ ```js
135
+ new RsdoctorRspackPlugin({
136
+ experiments: { enableNativePlugin: true }
137
+ }),
138
+ ```
139
+
88
140
  ### features
89
141
 
90
142
  - **Type:** [RsdoctorWebpackPluginFeatures](#rsdoctorwebpackpluginfeatures) | [Array\<keyof RsdoctorWebpackPluginFeatures\>](#rsdoctorwebpackpluginfeatures) | [RsdoctorRspackPluginFeatures](#rsdoctorrspackpluginfeatures) | [Array\<keyof RsdoctorRspackPluginFeatures\>](#rsdoctorrspackpluginfeatures)
@@ -151,39 +203,27 @@ import ModeIntro from '@en/shared/mode-intro.md';
151
203
 
152
204
  <ModeIntro />
153
205
 
154
- ### reportDir
206
+ ### output
155
207
 
156
- <Badge text="Version: 0.4.0" type="warning" />
208
+ <Badge text="Version 1.0.0" type="warning" />
157
209
 
158
- - **Type:** string
159
- - **Optional:** `true`
160
- - **Default:** undefined
210
+ #### compressData
161
211
 
162
- The output directory for Rsdoctor reports. By default, it is the build output directory.
212
+ - **Type:** boolean
213
+ - **Optional:** `true`
214
+ - **Default:** true
163
215
 
164
- ### brief
216
+ compressData is used to configure whether to compress the analysis data under [outputDir]/.rsdoctor.
165
217
 
166
- <Badge text="Version: 0.4.0" type="warning" />
218
+ #### reportDir
167
219
 
168
- - **Type:** [BriefType](#brieftype)
220
+ - **Type:** string
169
221
  - **Optional:** `true`
170
222
  - **Default:** undefined
171
223
 
172
- More configurations for Brief mode are as follows:
173
-
174
- - **reportHtmlName:** Configures the name of the HTML report for Brief mode. The default value is `report-rsdoctor.html`.
175
- - **writeDataJson:** By default, in Brief mode, the analysis data is injected into the HTML file, so no additional build analysis data is generated. If you want to generate additional local data, you need to configure `writeDataJson: true`.
176
-
177
- #### briefType
178
-
179
- ```ts
180
- interface BriefConfig {
181
- reportHtmlName?: string | undefined;
182
- writeDataJson: boolean;
183
- }
184
- ```
224
+ The output directory for Rsdoctor reports. By default, it is the build output directory.
185
225
 
186
- ### reportCodeType
226
+ #### reportCodeType
187
227
 
188
228
  - Type: `{ noModuleSource?: boolean; noAssetsAndModuleSource?: boolean }`
189
229
  - Optional: true
@@ -206,6 +246,26 @@ new RsdoctorRspackPlugin({
206
246
  }),
207
247
  ```
208
248
 
249
+ ### port
250
+
251
+ - **Type:** `number`
252
+ - **Optional:** `true`
253
+ - **Default:** `random(3000, 8999)`
254
+
255
+ Configure the port for the Rsdoctor server.
256
+
257
+ ### ~~reportCodeType [**Deprecated**]~~
258
+
259
+ <Badge text="Deprecated" type="warning" />
260
+
261
+ Please use [output.reportCodeType](#reportcodetype)
262
+
263
+ ### ~~reportDir [**Deprecated**]~~
264
+
265
+ <Badge text="Deprecated" type="warning" />
266
+
267
+ Please use [output.reportDir](#reportDir)
268
+
209
269
  ### supports
210
270
 
211
271
  - **Type:** [Supports Types](#supports-types)
@@ -235,6 +295,19 @@ When enabling the analysis of BannerPlugin, Rsdoctor should not be used in produ
235
295
 
236
296
  If `supports.banner` is enabled, Rsdoctor will enable compatibility logic for BannerPlugin. For more details, please refer to: [Supports BannerPlugin](../../guide/usage/bundle-size#supports-bannerplugin)
237
297
 
298
+ #### generateTileGraph
299
+
300
+ - default: true. The default value in rspack is false.
301
+ - type: boolean.
302
+
303
+ Whether to enable the ability to generate tile graphs, which affects whether the Bundle Size page has a tile graph from `webpack-bundle-analyzer`.
304
+
305
+ <img
306
+ src="https://assets.rspack.dev/others/assets/rsdoctor/bundle-size-tile-graph.png"
307
+ width="500px"
308
+ style={{ margin: 'auto' }}
309
+ />
310
+
238
311
  #### parseBundle
239
312
 
240
313
  - default: true.
@@ -257,36 +330,16 @@ Disabling the Parse Bundle capability will only affect the visibility of the Bun
257
330
 
258
331
  <div style={{ display: 'flex' }}>
259
332
  <img
260
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/bundled-size.jpeg"
333
+ src="https://assets.rspack.dev/others/assets/rsdoctor/bundled-size.jpeg"
261
334
  height="300px"
262
335
  width="300px"
263
336
  style={{ margin: 'auto' }}
264
337
  />
265
338
 
266
339
  <img
267
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/bundled-code.png"
340
+ src="https://assets.rspack.dev/others/assets/rsdoctor/bundled-code.png"
268
341
  height="300px"
269
342
  width="400px"
270
343
  style={{ margin: 'auto' }}
271
344
  />
272
345
  </div>
273
- #### generateTileGraph
274
-
275
- - default: true. The default value in rspack is false.
276
- - type: boolean.
277
-
278
- Whether to enable the ability to generate tile graphs, which affects whether the Bundle Size page has a tile graph from `webpack-bundle-analyzer`.
279
-
280
- <img
281
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/bundle/bundle-size-tile-graph.png"
282
- width="500px"
283
- style={{ margin: 'auto' }}
284
- />
285
-
286
- ### port
287
-
288
- - **Type:** `number`
289
- - **Optional:** `true`
290
- - **Default:** `random(3000, 8999)`
291
-
292
- Configure the port for the Rsdoctor server.
@@ -11,8 +11,8 @@
11
11
  },
12
12
  {
13
13
  "type": "dir",
14
- "name": "custom",
15
- "label": "User Custom"
14
+ "name": "rules",
15
+ "label": "Scan Rules"
16
16
  },
17
17
  {
18
18
  "type": "dir",
@@ -5,9 +5,9 @@
5
5
  When we **only need** the [bundle size analysis](../usage/bundle-size) feature of Rsdoctor, we can configure the corresponding [Features](/config/options/options) option when integrating the Rsdoctor plugin. Refer to the code snippet below:
6
6
 
7
7
  ```ts
8
- import { RsdoctorWebpackPlugin } from '@rsdoctor/webpack-plugin';
8
+ import { RsdoctorRspackPlugin } from '@rsdoctor/rspack-plugin';
9
9
 
10
- new RsdoctorWebpackPlugin({
10
+ new RsdoctorRspackPlugin({
11
11
  features: ['bundle'], // Represents enabling only the bundle size analysis feature
12
12
  });
13
13
  ```
@@ -19,7 +19,7 @@ Additionally, the builder will **parallelize the execution** of multiple non-con
19
19
  Furthermore, the asynchronous logic within loader functions cannot be recognized, causing a single loader function to potentially span across the execution of multiple other loaders. As a result, there are three possible cases, as shown in the following diagram:
20
20
 
21
21
  <img
22
- src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/usage/compile/loader-cases.jpeg"
22
+ src="https://assets.rspack.dev/others/assets/rsdoctor/loader-cases.jpeg"
23
23
  style={{ width: '250px' }}
24
24
  />
25
25
 
@@ -44,13 +44,13 @@ You can add the `lite` field to the `features` array to use the lite mode. Addit
44
44
  The following example enables the lite mode, build-time analysis, and bundle analysis:
45
45
 
46
46
  ```js
47
- const { RsdoctorWebpackPlugin } = require('@rsdoctor/webpack-plugin');
47
+ const { RsdoctorRspackPlugin } = require('@rsdoctor/rspack-plugin');
48
48
 
49
49
  // adding the plugin to your configuration
50
50
  module.exports = {
51
51
  // ...
52
52
  plugins: [
53
- new RsdoctorWebpackPlugin({
53
+ new RsdoctorRspackPlugin({
54
54
  disableClientServer: false,
55
55
  features: ['lite', 'loader', 'plugins', 'bundle'],
56
56
  }),
@@ -67,7 +67,7 @@ When using Rsdoctor to analyze the compilation time of Rspack projects, you may
67
67
 
68
68
  - Reason: The loader in [CssExtractRspackPlugin](https://rspack.dev/plugins/rspack/css-extract-rspack-plugin) asynchronously calls other loaders during the pitch phase and waits for the callback results after these loaders execute. Therefore, the time taken by CssExtractRspackPlugin actually includes the execution time of other loaders and idle time.
69
69
 
70
- <img src="https://raw.githubusercontent.com/rspack-contrib/rstack-design-resources/4ffe579c62f6e8d995b7856d608abdef61219155/rsdoctor/css-extract-loader.png" />
70
+ <img src="https://assets.rspack.dev/rsdoctor/css-extract-loader.png" />
71
71
 
72
72
  ## Next.js
73
73
 
@@ -0,0 +1 @@
1
+ ["rules", "rule-custom", "upload-data"]
@@ -188,11 +188,7 @@ At the same time, Rsdoctor also has two components that can be used to display r
188
188
 
189
189
  - Basic Rule Warning Component
190
190
 
191
- <img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/rule-1.jpeg" />
192
-
193
- - Code Display Component
194
-
195
- <img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/rule-2.jpeg" />
191
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/rule-1.jpeg" />
196
192
 
197
193
  ## Display components
198
194
 
@@ -259,7 +255,7 @@ report({
259
255
 
260
256
  - Display Components
261
257
 
262
- <img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/rule-1.jpeg" />
258
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/rule-1.jpeg" />
263
259
 
264
260
  - Component Code [Code](https://github.com/web-infra-dev/rsdoctor/blob/main/packages/components/src/components/Alert/link.tsx)
265
261
 
@@ -331,9 +327,7 @@ report({
331
327
 
332
328
  - Component Display
333
329
 
334
- <img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/rule-2.jpeg" />
335
-
336
- <img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/lognuvj/rsdoctor/docs/rule-3.jpeg" />
330
+ <img src="https://assets.rspack.dev/others/assets/rsdoctor/rule-3.jpeg" />
337
331
 
338
332
  - Component Code: [Code](https://github.com/web-infra-dev/rsdoctor/blob/main/packages/components/src/components/Alert/view.tsx)
339
333