obsidian-semantic

Log | Files | Refs | README

commit e1efb17322a5bdc194b547cdca3c4711952917ca
parent 123b00ca52a1316f11d90ffb51dcc62fbd72eebc
Author: lishid <lishid@gmail.com>
Date:   Tue,  6 Apr 2021 08:47:51 -0400

Rollup: Don't include source code in distribution.

Diffstat:
Mpackage.json | 2+-
Mrollup.config.js | 3+++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git 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 @@ -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,