Skip to content

Commit e361a80

Browse files
jambonnhoanguyen
andauthored
fix(ssr-manifest): check name before saving to ssrManifest (#9595)
* fix(ssr-manifest): filter path undefined when dynamic import Co-authored-by: hoanguyen <[email protected]>
1 parent 7f01a00 commit e361a80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/src/node/ssr/ssrManifestPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function ssrManifestPlugin(config: ResolvedConfig): Plugin {
3939
const code = chunk.code
4040
let imports: ImportSpecifier[]
4141
try {
42-
imports = parseImports(code)[0].filter((i) => i.d > -1)
42+
imports = parseImports(code)[0].filter((i) => i.n && i.d > -1)
4343
} catch (e: any) {
4444
this.error(e, e.idx)
4545
}

0 commit comments

Comments
 (0)