Skip to content

Commit

Permalink
fix: minify config of swc (#6871)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClarkXia authored May 6, 2024
1 parent 11a87dc commit a805fa9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tricky-cheetahs-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ice/webpack-config': patch
---

fix: minify config of swc
3 changes: 2 additions & 1 deletion packages/webpack-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit a805fa9

Please sign in to comment.