Skip to content

Commit a12d14b

Browse files
committed
docs
1 parent bc21e3b commit a12d14b

File tree

3 files changed

+48
-12
lines changed

3 files changed

+48
-12
lines changed

packages/core/src/types/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,13 +1159,13 @@ export type ManifestByEntry = {
11591159
/** Async CSS files for this entry. */
11601160
css?: string[];
11611161
};
1162+
/** HTML files generated for this entry, if any. */
1163+
html?: string[];
11621164
/**
11631165
* Additional assets associated with this entry.
11641166
* For example images、fonts、source maps and other non JS or CSS files.
11651167
*/
11661168
assets?: string[];
1167-
/** HTML files generated for this entry, if any. */
1168-
html?: string[];
11691169
};
11701170

11711171
export type ManifestData = {

website/docs/en/config/output/manifest.mdx

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,43 @@ The manifest file will be output with the following structure by default:
5555
type FilePath = string;
5656

5757
type ManifestList = {
58+
/**
59+
* A flat list of all emitted asset files.
60+
*/
61+
allFiles: FilePath[];
62+
/**
63+
* Maps each entry name to its associated output files.
64+
*/
5865
entries: {
59-
/** The key is the entry name, from Rsbuild's source.entry config. */
6066
[entryName: string]: {
67+
/**
68+
* Files that are required during the initial load of the entry.
69+
*/
6170
initial?: {
71+
/** Initial JavaScript files for this entry. */
6272
js?: FilePath[];
73+
/** Initial CSS files for this entry. */
6374
css?: FilePath[];
6475
};
76+
/**
77+
* Files that may be loaded asynchronously.
78+
* Usually code-split chunks or lazily loaded chunks.
79+
*/
6580
async?: {
81+
/** Async JavaScript files for this entry. */
6682
js?: FilePath[];
83+
/** Async CSS files for this entry. */
6784
css?: FilePath[];
6885
};
69-
/** HTML files related to the current entry */
86+
/** HTML files generated for this entry, if any. */
7087
html?: FilePath[];
71-
/** other assets (e.g., png, svg, source map) related to the current entry */
88+
/**
89+
* Additional assets associated with this entry.
90+
* For example images、fonts、source maps and other non JS or CSS files.
91+
*/
7292
assets?: FilePath[];
7393
};
7494
};
75-
/** Flatten all assets */
76-
allFiles: FilePath[];
7795
};
7896
```
7997

website/docs/zh/config/output/manifest.mdx

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,43 @@ manifest 文件默认输出的结构为:
5555
type FilePath = string;
5656

5757
type ManifestList = {
58+
/**
59+
* 所有构建产物文件的扁平列表
60+
*/
61+
allFiles: FilePath[];
62+
/**
63+
* 将每个入口名称映射到其关联的输出文件
64+
*/
5865
entries: {
59-
/** key 为 entry 名称,对应 Rsbuild 的 source.entry 配置 */
6066
[entryName: string]: {
67+
/**
68+
* 入口在初始加载阶段所需的文件
69+
*/
6170
initial?: {
71+
/** 当前入口的初始 JavaScript 文件 */
6272
js?: FilePath[];
73+
/** 当前入口的初始 CSS 文件 */
6374
css?: FilePath[];
6475
};
76+
/**
77+
* 异步加载的文件
78+
* 通常是代码分割的 chunk 或懒加载的资源
79+
*/
6580
async?: {
81+
/** 当前入口的异步 JavaScript 文件 */
6682
js?: FilePath[];
83+
/** 当前入口的异步 CSS 文件 */
6784
css?: FilePath[];
6885
};
69-
/** 当前 entry 关联的 HTML 页面 */
86+
/** 当前入口生成的 HTML 文件(如果有) */
7087
html?: FilePath[];
71-
/** 和当前 entry 相关的其他资源(如 png、svg、source map 等) */
88+
/**
89+
* 与当前入口关联的其他资源
90+
* 例如图片、字体、source map 以及其他非 JS 或 CSS 文件
91+
*/
7292
assets?: FilePath[];
7393
};
7494
};
75-
/** 铺平的所有 assets */
76-
allFiles: FilePath[];
7795
};
7896
```
7997

0 commit comments

Comments
 (0)