diff options
| -rw-r--r-- | package.json | 2 | ||||
| -rw-r--r-- | rollup.config.js | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/package.json b/package.json index c0573df..e64cbd1 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "main.js", "scripts": { "dev": "rollup --config rollup.config.js -w", - "build": "rollup --config rollup.config.js" + "build": "rollup --config rollup.config.js --environment BUILD:production" }, "keywords": [], "author": "", diff --git a/rollup.config.js b/rollup.config.js index 96cff59..dd4d041 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -2,6 +2,8 @@ import typescript from '@rollup/plugin-typescript'; import {nodeResolve} from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
+const isProd = (process.env.BUILD === 'production');
+
const banner =
`/*
THIS IS A GENERATED/BUNDLED FILE BY ROLLUP
@@ -14,6 +16,7 @@ export default { output: {
dir: '.',
sourcemap: 'inline',
+ sourcemapExcludeSources: isProd,
format: 'cjs',
exports: 'default',
banner,
|
