Skip to content

Commit 87d7051

Browse files
authored
Merge pull request #79 from cristianbote/source-map-option
Added source-map option
2 parents 81c8e4c + fdf9034 commit 87d7051

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Just like `microbundle build`, but watches your source files and rebuilds on any
7272
--strict Enforce undefined global context and add "use strict"
7373
--name Specify name exposed in UMD builds
7474
--cwd Use an alternative working directory (default .)
75+
--sourcemap Generate source map (default true)
7576
-h, --help Displays this message
7677
```
7778

src/cli.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ prog
1818
.option('--compress', 'Compress output using UglifyJS', true)
1919
.option('--strict', 'Enforce undefined global context and add "use strict"')
2020
.option('--name', 'Specify name exposed in UMD builds')
21-
.option('--cwd', 'Use an alternative working directory', '.');
21+
.option('--cwd', 'Use an alternative working directory', '.')
22+
.option('--sourcemap', 'Generate source map', true);
2223

2324
prog
2425
.command('build [...entries]', '', { default: true })

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ function createConfig(options, entry, format, writeMeta) {
310310
strict: options.strict===true,
311311
legacy: true,
312312
freeze: false,
313-
sourcemap: true,
313+
sourcemap: options.sourcemap!==false,
314314
treeshake: {
315315
propertyReadSideEffects: false
316316
},

0 commit comments

Comments
 (0)