Skip to content

Commit 9cc678d

Browse files
Don't minify by default for target == "node"
1 parent 341a8f3 commit 9cc678d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/prog.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const toArray = val => (Array.isArray(val) ? val : val == null ? [] : [val]);
66
export default handler => {
77
const cmd = type => (str, opts) => {
88
opts.watch = opts.watch || type === 'watch';
9+
opts.compress = opts.compress != null || opts.target !== 'node';
910
opts.entries = toArray(str || opts.entry).concat(opts._);
1011
handler(opts);
1112
};
@@ -22,7 +23,7 @@ export default handler => {
2223
.option('--external', `Specify external dependencies, or 'none'`)
2324
.option('--globals', `Specify globals dependencies, or 'none'`)
2425
.example('microbundle --globals react=React,jquery=$')
25-
.option('--compress', 'Compress output using Terser', true)
26+
.option('--compress', 'Compress output using Terser', null)
2627
.option('--strict', 'Enforce undefined global context and add "use strict"')
2728
.option('--name', 'Specify name exposed in UMD builds')
2829
.option('--cwd', 'Use an alternative working directory', '.')

0 commit comments

Comments
 (0)