File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,11 @@ export function normalizeClientManifest (manifest: ClientManifest | LegacyClient
136
136
// Prepare first entrypoint to receive extra data
137
137
const first = getIdentifier ( manifest . initial . find ( isJS ) ! )
138
138
if ( first ) {
139
+ if ( ! ( first in clientManifest ) ) {
140
+ throw new Error (
141
+ `Invalid manifest - initial entrypoint not in \`all\`: ${ manifest . initial . find ( isJS ) } `
142
+ )
143
+ }
139
144
clientManifest [ first ] . css = [ ]
140
145
clientManifest [ first ] . assets = [ ]
141
146
clientManifest [ first ] . dynamicImports = [ ]
@@ -154,6 +159,9 @@ export function normalizeClientManifest (manifest: ClientManifest | LegacyClient
154
159
for ( const outfile of manifest . async ) {
155
160
if ( isJS ( outfile ) ) {
156
161
const identifier = getIdentifier ( outfile )
162
+ if ( ! ( identifier in clientManifest ) ) {
163
+ throw new Error ( `Invalid manifest - async module not in \`all\`: ${ outfile } ` )
164
+ }
157
165
clientManifest [ identifier ] . isDynamicEntry = true
158
166
clientManifest [ first ] . dynamicImports ! . push ( identifier )
159
167
} else if ( first ) {
You can’t perform that action at this time.
0 commit comments