Skip to content

Commit 71543b2

Browse files
moonglumFND
andauthored
Fixup for compaction
Co-authored-by: FND <[email protected]>
1 parent 066bcf6 commit 71543b2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/bundle/swc.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ exports.generateSWCConfig = function({ esnext, typescript, jsx, sourcemaps, brow
5050
return /^\.{0,2}\//.test(pkg) ? pkg : `node_modules/${pkg}/**`;
5151
});
5252

53-
if(compact === "minify") {
54-
jsc.minify = { compress: false, mangle: false };
55-
} else if(compact === "mangle") {
56-
jsc.minify = { compress: false, mangle: true };
53+
let mangle = compact === "mangle";
54+
if(mangle || compact === "minify") {
55+
var minify = true;
56+
jsc.minify = { compress: false, mangle };
5757
}
5858

5959
return {
60-
minify: (compact === "minify") || (compact === "mangle"),
60+
minify,
6161
rollup,
6262
env,
6363
jsc

0 commit comments

Comments
 (0)