Skip to content

Commit 7b9bbeb

Browse files
authored
docs: only generate stats.json (#4340)
1 parent e1c459c commit 7b9bbeb

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

website/docs/en/config/performance/bundle-analyze.mdx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,27 @@ export default {
107107
};
108108
```
109109

110+
In the output directory, you will see `stats.json` and `report-web.html` files.
111+
112+
```
113+
└── dist
114+
├── stats.json
115+
└── report-web.html
116+
```
117+
118+
If you don't need the `report-web.html`, you can set `analyzerMode` to `disabled`.
119+
120+
```js
121+
export default {
122+
performance: {
123+
bundleAnalyze: {
124+
analyzerMode: 'disabled',
125+
generateStatsFile: true,
126+
},
127+
},
128+
};
129+
```
130+
110131
## Notes
111132

112133
1. Enabling the server mode will cause the `build` process to not exit normally.

website/docs/zh/config/performance/bundle-analyze.mdx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,27 @@ export default {
107107
};
108108
```
109109

110+
在产物目录下会生成 `stats.json``report-web.html` 文件。
111+
112+
```
113+
└── dist
114+
├── stats.json
115+
└── report-web.html
116+
```
117+
118+
如果你不需要 `report-web.html`,可以设置 `analyzerMode``disabled`
119+
120+
```js
121+
export default {
122+
performance: {
123+
bundleAnalyze: {
124+
analyzerMode: 'disabled',
125+
generateStatsFile: true,
126+
},
127+
},
128+
};
129+
```
130+
110131
## 注意事项
111132

112133
1. 开启 Server 模式会导致 `build` 进程不能正常退出。

0 commit comments

Comments
 (0)