Skip to content

Commit

Permalink
fix(ssr-manifest): filter path undefined when dynamic import (#9655)
Browse files Browse the repository at this point in the history
  • Loading branch information
jambonn authored Aug 15, 2022
1 parent 07fe65e commit 1478a2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/ssr/ssrManifestPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function ssrManifestPlugin(config: ResolvedConfig): Plugin {
const code = chunk.code
let imports: ImportSpecifier[]
try {
imports = parseImports(code)[0].filter((i) => i.d > -1)
imports = parseImports(code)[0].filter((i) => i.n && i.d > -1)
} catch (e: any) {
this.error(e, e.idx)
}
Expand Down

0 comments on commit 1478a2f

Please sign in to comment.