File tree Expand file tree Collapse file tree 3 files changed +48
-12
lines changed
Expand file tree Collapse file tree 3 files changed +48
-12
lines changed Original file line number Diff line number Diff 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
11711171export type ManifestData = {
Original file line number Diff line number Diff line change @@ -55,25 +55,43 @@ The manifest file will be output with the following structure by default:
5555type FilePath = string ;
5656
5757type 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
Original file line number Diff line number Diff line change @@ -55,25 +55,43 @@ manifest 文件默认输出的结构为:
5555type FilePath = string ;
5656
5757type 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
You can’t perform that action at this time.
0 commit comments