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",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "rollup --config rollup.config.js -w",
|
"dev": "rollup --config rollup.config.js -w",
|
||||||
"build": "rollup --config rollup.config.js"
|
"build": "rollup --config rollup.config.js --environment BUILD:production"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|
|
@ -2,6 +2,8 @@ import typescript from '@rollup/plugin-typescript';
|
||||||
import {nodeResolve} from '@rollup/plugin-node-resolve';
|
import {nodeResolve} from '@rollup/plugin-node-resolve';
|
||||||
import commonjs from '@rollup/plugin-commonjs';
|
import commonjs from '@rollup/plugin-commonjs';
|
||||||
|
|
||||||
|
const isProd = (process.env.BUILD === 'production');
|
||||||
|
|
||||||
const banner =
|
const banner =
|
||||||
`/*
|
`/*
|
||||||
THIS IS A GENERATED/BUNDLED FILE BY ROLLUP
|
THIS IS A GENERATED/BUNDLED FILE BY ROLLUP
|
||||||
|
@ -14,6 +16,7 @@ export default {
|
||||||
output: {
|
output: {
|
||||||
dir: '.',
|
dir: '.',
|
||||||
sourcemap: 'inline',
|
sourcemap: 'inline',
|
||||||
|
sourcemapExcludeSources: isProd,
|
||||||
format: 'cjs',
|
format: 'cjs',
|
||||||
exports: 'default',
|
exports: 'default',
|
||||||
banner,
|
banner,
|
||||||
|
|
Loading…
Reference in a new issue