Skip to content

Commit f2f38d0

Browse files
authored
Rollup optimizations
1 parent 124c9c6 commit f2f38d0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,16 @@ function createConfig(options, entry, format, writeMeta) {
681681
globals,
682682
strict: options.strict === true,
683683
freeze: false,
684+
compact: true,
685+
treeshake: {
686+
// use Rollup's most optimal tree-shaking: (drops unused getter reads)
687+
preset: 'smallest',
688+
// preserve side-effect-only imports:
689+
moduleSideEffects: true
690+
},
691+
generatedCode: modern ? 'es2015' : 'es5',
692+
// turn off live bindings support (exports.* getters for re-exports)
693+
externalLiveBindings: false,
684694
esModule: false,
685695
sourcemap: options.sourcemap,
686696
get banner() {

0 commit comments

Comments
 (0)