From 9c6798003ef048b4d8c7a50da4e6968501e59bbe Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Thu, 9 Dec 2021 16:21:04 -0500 Subject: [PATCH 1/2] Rollup tweaks for output size/perf This turns off `externalLiveBindings`, which generates getters for re-exported bindings. It also enables modern code generation for the modern bundles (arrow functions, object shorthand, etc). --- src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.js b/src/index.js index b83c007f..8251d598 100644 --- a/src/index.js +++ b/src/index.js @@ -680,6 +680,8 @@ function createConfig(options, entry, format, writeMeta) { strict: options.strict === true, freeze: false, esModule: false, + generatedCode: modern ? 'es2015' : 'es5', + externalLiveBindings: false, sourcemap: options.sourcemap, get banner() { return shebang[options.name]; From cf4716064cd2b64179ad3d3671279e4d6c9a1570 Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Thu, 9 Dec 2021 16:24:41 -0500 Subject: [PATCH 2/2] turn off generatedCode option until Rollup is upgraded --- src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 8251d598..594c093a 100644 --- a/src/index.js +++ b/src/index.js @@ -680,7 +680,8 @@ function createConfig(options, entry, format, writeMeta) { strict: options.strict === true, freeze: false, esModule: false, - generatedCode: modern ? 'es2015' : 'es5', + // @TODO: enable this when updating to the latest Rollup: + //generatedCode: modern ? 'es2015' : 'es5', externalLiveBindings: false, sourcemap: options.sourcemap, get banner() {