Skip to content

Commit

Permalink
fix(ssr-manifest): check name before saving to ssrManifest (#9595)
Browse files Browse the repository at this point in the history

* fix(ssr-manifest): filter path undefined when dynamic import

Co-authored-by: hoanguyen <hoanguyen@beeketing.net>
  • Loading branch information
jambonn and hoanguyen authored Aug 12, 2022
1 parent 7f01a00 commit e361a80
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 e361a80

Please # to comment.