Making treeshaking dependent on production builds
This commit is contained in:
parent
f2e9de9423
commit
0922aa4c87
2
build.ts
2
build.ts
@ -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 => {
|
||||
|
Loading…
Reference in New Issue
Block a user