diff --git a/README.md b/README.md index 6c04240..8bbc6ee 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/src/cli.js b/src/cli.js index 95b04c0..2561ce2 100644 --- a/src/cli.js +++ b/src/cli.js @@ -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 }) diff --git a/src/index.js b/src/index.js index 2209d03..fb889ee 100644 --- a/src/index.js +++ b/src/index.js @@ -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 },