We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a68db0 commit caf5d69Copy full SHA for caf5d69
packages/core/src/config.ts
@@ -656,7 +656,10 @@ const composeExternalsConfig = (
656
esm: 'module-import',
657
cjs: 'commonjs',
658
umd: 'umd',
659
- mf: 'var', // same as default value
+ // 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.
662
+ mf: 'global',
663
} as const;
664
665
switch (format) {
0 commit comments