@rsdoctor/docs 1.5.10 → 1.5.11

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.
@@ -94,6 +94,25 @@ rsdoctor-agent bundle optimize --data-file ./dist/rsdoctor-data.json --side-effe
94
94
  rsdoctor-agent query packages_duplicates --data-file ./dist/rsdoctor-data.json --filter "<command-specific-filter>"
95
95
  ```
96
96
 
97
+ ### QA
98
+
99
+ #### What should I do if `rsdoctor-data.json` is not generated correctly?
100
+
101
+ The `rsdoctor-analysis` skill analyzes the data in `rsdoctor-data.json`. You can generate this file by setting `output.mode` to `'brief'` and `output.options.type` to `['json']`:
102
+
103
+ ```js
104
+ new RsdoctorRspackPlugin({
105
+ output: {
106
+ mode: 'brief',
107
+ options: {
108
+ type: ['json'],
109
+ },
110
+ },
111
+ });
112
+ ```
113
+
114
+ You can also set the `RSDOCTOR_OUTPUT='json'` environment variable to output the analysis data as a JSON file. This environment configuration requires `@rsdoctor/*-plugin` version `>= 1.5.11`.
115
+
97
116
  ## MCP Server
98
117
 
99
118
  Rsdoctor provides MCP Server so AI tools can query your local build analysis data. See the [MCP Server](/guide/usage/mcp) documentation.
@@ -94,6 +94,25 @@ rsdoctor-agent bundle optimize --data-file ./dist/rsdoctor-data.json --side-effe
94
94
  rsdoctor-agent query packages_duplicates --data-file ./dist/rsdoctor-data.json --filter "<command-specific-filter>"
95
95
  ```
96
96
 
97
+ ### QA
98
+
99
+ #### 如果没有正确生成 `rsdoctor-data.json` 应该怎么办?
100
+
101
+ `rsdoctor-analysis` Skill 分析的是 `rsdoctor-data.json` 中的数据。你可以通过将 `output.mode` 设置为 `'brief'`,并将 `output.options.type` 设置为 `['json']` 来生成该文件:
102
+
103
+ ```js
104
+ new RsdoctorRspackPlugin({
105
+ output: {
106
+ mode: 'brief',
107
+ options: {
108
+ type: ['json'],
109
+ },
110
+ },
111
+ });
112
+ ```
113
+
114
+ 也可以通过设置 `RSDOCTOR_OUTPUT='json'` 环境变量,将分析数据输出为 JSON 文件。这个环境配置需要 `@rsdoctor/*-plugin` `>= 1.5.11`。
115
+
97
116
  ## MCP Server
98
117
 
99
118
  Rsdoctor 提供 MCP Server 让 AI 工具可以查询本地构建分析数据,详见 [MCP Server](/guide/usage/mcp) 文档。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdoctor/docs",
3
- "version": "1.5.10",
3
+ "version": "1.5.11",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/web-infra-dev/rsdoctor",
@@ -34,8 +34,8 @@
34
34
  "rspress-plugin-font-open-sans": "^1.0.3",
35
35
  "rspress-plugin-sitemap": "^1.2.1",
36
36
  "typescript": "^5.9.2",
37
- "@rsbuild/plugin-sass": "^1.5.1",
38
- "@rsdoctor/types": "1.5.10"
37
+ "@rsbuild/plugin-sass": "^1.5.2",
38
+ "@rsdoctor/types": "1.5.11"
39
39
  },
40
40
  "dependencies": {
41
41
  "@rstack-dev/doc-ui": "1.12.5",