Skip to content

Commit 828abcd

Browse files
author
nyqykk
committed
chore: modify note
1 parent 757cd3f commit 828abcd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/core/src/config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,9 @@ const composeExternalsConfig = (
656656
esm: 'module-import',
657657
cjs: 'commonjs',
658658
umd: 'umd',
659-
// if use 'var', when users use external package like '@pkg', this will cause syntax error like 'var pkg = @pkg'
659+
// If use 'var', when projects import an external package like '@pkg', this will cause a syntax error such as 'var pkg = @pkg'.
660+
// If use 'umd', the judgement conditions may be affected by other packages that define variables like 'define'.
661+
// Therefore, we use 'global' to satisfy both web and node environments.
660662
mf: 'global',
661663
} as const;
662664

0 commit comments

Comments
 (0)