diff --git a/build.ts b/build.ts index e7d3156..ae77068 100644 --- a/build.ts +++ b/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 => {