Rollup: Don't include source code in distribution.
This commit is contained in:
parent
123b00ca52
commit
e1efb17322
2 changed files with 4 additions and 1 deletions
|
@ -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": "",
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue