Merge pull request #79 from cristianbote/source-map-option

Added source-map option
This commit is contained in:
Jason Miller 2018-02-20 22:16:30 -05:00 committed by GitHub
commit 87d70512fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -72,6 +72,7 @@ Just like `microbundle build`, but watches your source files and rebuilds on any
--strict Enforce undefined global context and add "use strict"
--name Specify name exposed in UMD builds
--cwd Use an alternative working directory (default .)
--sourcemap Generate source map (default true)
-h, --help Displays this message
```

View File

@ -18,7 +18,8 @@ prog
.option('--compress', 'Compress output using UglifyJS', true)
.option('--strict', 'Enforce undefined global context and add "use strict"')
.option('--name', 'Specify name exposed in UMD builds')
.option('--cwd', 'Use an alternative working directory', '.');
.option('--cwd', 'Use an alternative working directory', '.')
.option('--sourcemap', 'Generate source map', true);
prog
.command('build [...entries]', '', { default: true })

View File

@ -310,7 +310,7 @@ function createConfig(options, entry, format, writeMeta) {
strict: options.strict===true,
legacy: true,
freeze: false,
sourcemap: true,
sourcemap: options.sourcemap!==false,
treeshake: {
propertyReadSideEffects: false
},