Skip to content

Commit

Permalink
Merge pull request #79 from cristianbote/source-map-option
Browse files Browse the repository at this point in the history
Added source-map option
  • Loading branch information
developit committed Feb 21, 2018
2 parents 81c8e4c + fdf9034 commit 87d7051
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -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
```

Expand Down
3 changes: 2 additions & 1 deletion src/cli.js
Expand Up @@ -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 })
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Expand Up @@ -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
},
Expand Down

0 comments on commit 87d7051

Please sign in to comment.