Making treeshaking dependent on production builds

This commit is contained in:
Fabian Stamm 2020-02-07 19:33:24 +01:00
parent f2e9de9423
commit 0922aa4c87

View File

@ -48,6 +48,7 @@ let configs = pages.map(page => {
watch: {
clearScreen: false
},
treeshake: production,
plugins: [
(typescript as any)({
tsconfig: "./src/tsconfig.json"
@ -121,7 +122,6 @@ if (process.argv.indexOf("-w") >= 0) {
} else {
start = process.hrtime();
Promise.all(configs.map(config => {
config.treeshake = true;
return rollup.rollup(config).then((value) => {
return value.write(Array.isArray(config.output) ? config.output[0] : config.output);
}).catch(err => {