Skip to content

Commit

Permalink
docs: only generate stats.json
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Jan 7, 2025
1 parent e1c459c commit 0ae08c8
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
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

0 comments on commit 0ae08c8

Please sign in to comment.