diff --git a/.changeset/tricky-cheetahs-mate.md b/.changeset/tricky-cheetahs-mate.md new file mode 100644 index 0000000000..0071da5fbd --- /dev/null +++ b/.changeset/tricky-cheetahs-mate.md @@ -0,0 +1,5 @@ +--- +'@ice/webpack-config': patch +--- + +fix: minify config of swc diff --git a/packages/webpack-config/src/index.ts b/packages/webpack-config/src/index.ts index dd187bda1b..3f0ab39271 100644 --- a/packages/webpack-config/src/index.ts +++ b/packages/webpack-config/src/index.ts @@ -139,7 +139,8 @@ export function getWebpackConfig(options: GetWebpackConfigOptions): Configuratio inline: 2, passes: 4, }, - mangle: { + // If JSMinifier is swc remove mangle config because it will cause minification error. + mangle: minify === JSMinifier.swc ? {} : { safari10: true, }, format: {