You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/backend-integration.md
+40-4Lines changed: 40 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ If you need a custom integration, you can follow the steps in this guide to conf
64
64
65
65
3. For production, after running `vite build`, a `.vite/manifest.json` file will be generated alongside other asset files. An example manifest file looks like this:
@@ -106,17 +106,53 @@ If you need a custom integration, you can follow the steps in this guide to conf
106
106
107
107
The manifest has a `Record<name, chunk>` structure where each chunk follows the `ManifestChunk` interface:
108
108
109
-
```ts
109
+
```ts style:max-height:400px
110
110
interfaceManifestChunk {
111
+
/**
112
+
* The input file name of this chunk / asset if known
113
+
*/
111
114
src?:string
115
+
/**
116
+
* The output file name of this chunk / asset
117
+
*/
112
118
file:string
119
+
/**
120
+
* The list of CSS files imported by this chunk
121
+
*
122
+
* This field is only present in JS chunks.
123
+
*/
113
124
css?:string[]
125
+
/**
126
+
* The list of asset files imported by this chunk, excluding CSS files
127
+
*
128
+
* This field is only present in JS chunks.
129
+
*/
114
130
assets?:string[]
131
+
/**
132
+
* Whether this chunk or asset is an entry point
133
+
*/
115
134
isEntry?:boolean
135
+
/**
136
+
* The name of this chunk / asset if known
137
+
*/
116
138
name?:string
117
-
names?:string[]
139
+
/**
140
+
* Whether this chunk is a dynamic entry point
141
+
*
142
+
* This field is only present in JS chunks.
143
+
*/
118
144
isDynamicEntry?:boolean
145
+
/**
146
+
* The list of statically imported chunks by this chunk
147
+
*
148
+
* The values are the keys of the manifest. This field is only present in JS chunks.
149
+
*/
119
150
imports?:string[]
151
+
/**
152
+
* The list of dynamically imported chunks by this chunk
153
+
*
154
+
* The values are the keys of the manifest. This field is only present in JS chunks.
155
+
*/
120
156
dynamicImports?:string[]
121
157
}
122
158
```
@@ -128,7 +164,7 @@ If you need a custom integration, you can follow the steps in this guide to conf
128
164
-**Asset chunks**: Generated from imported assets like images, fonts. Their key is the relative src path from project root.
129
165
-**CSS files**: When [`build.cssCodeSplit`](/config/build-options.md#build-csscodesplit) is `false`, a single CSS file is generated with the key `style.css`. When `build.cssCodeSplit` is not `false`, the key is generated similar to JS chunks (i.e. entry chunks will not have `_` prefix and non-entry chunks will have `_` prefix).
130
166
131
-
Chunks will contain information on their static and dynamic imports (both are keys that map to the corresponding chunk in the manifest), and also their corresponding CSS and asset files (if any).
167
+
JS chunks (chunks other than assets or CSS) will contain information on their static and dynamic imports (both are keys that map to the corresponding chunk in the manifest), and also their corresponding CSS and asset files (if any).
132
168
133
169
4. You can use this file to render links or preload directives with hashed filenames.
0 commit comments