diff options
| author | lishid <[email protected]> | 2021-04-06 08:47:51 -0400 |
|---|---|---|
| committer | lishid <[email protected]> | 2021-04-06 08:48:36 -0400 |
| commit | e1efb17322a5bdc194b547cdca3c4711952917ca (patch) | |
| tree | d0f623e8038847f4489969d528b2af8b311c07de | |
| parent | 123b00ca52a1316f11d90ffb51dcc62fbd72eebc (diff) | |
| download | ai-pulse-obsidian-plugin-e1efb17322a5bdc194b547cdca3c4711952917ca.tar.gz ai-pulse-obsidian-plugin-e1efb17322a5bdc194b547cdca3c4711952917ca.zip | |
Rollup: Don't include source code in distribution.
| -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,
|
