Skip to content

Commit 757cd3f

Browse files
author
nyqykk
committed
fix: use global as mf format external type
1 parent 3a68db0 commit 757cd3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/src/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,8 @@ const composeExternalsConfig = (
656656
esm: 'module-import',
657657
cjs: 'commonjs',
658658
umd: 'umd',
659-
mf: 'var', // same as default value
659+
// if use 'var', when users use external package like '@pkg', this will cause syntax error like 'var pkg = @pkg'
660+
mf: 'global',
660661
} as const;
661662

662663
switch (format) {

0 commit comments

Comments
 (0)