Skip to content

Commit 5cbadc4

Browse files
author
nyqykk
committed
chore: use external type map to simplify code
1 parent 4720213 commit 5cbadc4

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

packages/core/src/config.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -646,12 +646,14 @@ const composeExternalsConfig = (
646646
esm: 'module-import',
647647
cjs: 'commonjs',
648648
umd: 'umd',
649+
mf: 'var', // same as default value
649650
} as const;
650651

651652
switch (format) {
652653
case 'esm':
653654
case 'cjs':
654655
case 'umd':
656+
case 'mf':
655657
return {
656658
output: externals
657659
? {
@@ -664,14 +666,6 @@ const composeExternalsConfig = (
664666
},
665667
},
666668
};
667-
case 'mf':
668-
return {
669-
output: externals
670-
? {
671-
externals,
672-
}
673-
: {},
674-
};
675669
default:
676670
throw new Error(`Unsupported format: ${format}`);
677671
}

0 commit comments

Comments
 (0)