Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: only generate stats.json #4340

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions website/docs/en/config/performance/bundle-analyze.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,27 @@ export default {
};
```

In the output directory, you will see `stats.json` and `report-web.html` files.

```
└── dist
├── stats.json
└── report-web.html
```

If you don't need the `report-web.html`, you can set `analyzerMode` to `disabled`.

```js
export default {
performance: {
bundleAnalyze: {
analyzerMode: 'disabled',
generateStatsFile: true,
},
},
};
```

## Notes

1. Enabling the server mode will cause the `build` process to not exit normally.
Expand Down
21 changes: 21 additions & 0 deletions website/docs/zh/config/performance/bundle-analyze.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,27 @@ export default {
};
```

在产物目录下会生成 `stats.json` 和 `report-web.html` 文件。

```
└── dist
├── stats.json
└── report-web.html
```

如果你不需要 `report-web.html`,可以设置 `analyzerMode` 为 `disabled`。

```js
export default {
performance: {
bundleAnalyze: {
analyzerMode: 'disabled',
generateStatsFile: true,
},
},
};
```

## 注意事项

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