File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ const toArray = val => (Array.isArray(val) ? val : val == null ? [] : [val]);
66export 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' , '.' )
You can’t perform that action at this time.
0 commit comments