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: add JSDoc for PrintFileSizeOptions #4043

Merged
merged 1 commit into from
Nov 22, 2024
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
13 changes: 13 additions & 0 deletions packages/core/src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,21 @@ export type BuildCacheOptions = {
};

export type PrintFileSizeOptions = {
/**
* Whether to print the total size of all static assets.
* @default true
*/
total?: boolean;
/**
* Whether to print the size of each static asset.
* @default true
*/
detail?: boolean;
/**
* Whether to print the gzip-compressed size of each static asset.
* Disable this option can save some gzip computation time for large projects.
* @default true
*/
compressed?: boolean;
};

Expand Down
13 changes: 8 additions & 5 deletions website/docs/en/config/performance/print-file-size.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@

```ts
type PrintFileSizeOptions =
| boolean
| {
/**
* whether to print total size
* Whether to print the total size of all static assets.
* @default true
*/
total?: boolean;
/**
* whether to print size of each file
* Whether to print the size of each static asset.
* @default true
*/
detail?: boolean;
/**
* whether to print gzip-compressed size
* Whether to print the gzip-compressed size of each static asset.
* @default true
*/
compressed?: boolean;
}
| boolean;
};
```

- **Default:** `true`
Expand Down
11 changes: 7 additions & 4 deletions website/docs/zh/config/performance/print-file-size.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@

```ts
type PrintFileSizeOptions =
| boolean
| {
/**
* 是否输出所有静态资源文件的总体积
* 是否输出所有静态资源的总体积
* @default true
*/
total?: boolean;
/**
* 是否输出每个静态资源文件的体积
* 是否输出每个静态资源的体积
* @default true
*/
detail?: boolean;
/**
* 是否输出 gzip 压缩后的体积
* @default true
*/
compressed?: boolean;
}
| boolean;
};
```

- **默认值:** `true`
Expand Down
Loading