Skip to content

Commit 4484b4e

Browse files
committed
fix: improve codegen output
1 parent 705bff3 commit 4484b4e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/demo/utils/codegen.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -312,13 +312,15 @@ function buildMinimalBundleCode(
312312
importStatements.push(
313313
`import type { ComposeOption } from ${quote}echarts/core${quote}${semiStr}`
314314
);
315-
const importTypeStatements = importSources.map(([imports, mod]) =>
316-
importItems(
317-
imports.filter(a => a.endsWith("Option")),
318-
mod,
319-
{ ...options, type: true }
315+
const importTypeStatements = importSources
316+
.map(([imports, mod]) =>
317+
importItems(
318+
imports.filter(a => a.endsWith("Option")),
319+
mod,
320+
{ ...options, type: true }
321+
)
320322
)
321-
);
323+
.filter(Boolean);
322324
importStatements.push(...importTypeStatements);
323325
}
324326

0 commit comments

Comments
 (0)