Skip to content

Commit 1478a2f

Browse files
authored
fix(ssr-manifest): filter path undefined when dynamic import (#9655)
1 parent 07fe65e commit 1478a2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
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)