From c81c64539418a42ec19c9c0c7694bf291d9c85b8 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 4 Oct 2021 19:46:07 +0300 Subject: rollup: specify `generatedCode: 'es2015'` (#35070) This will make use of `const` and modern features (which we are already using in our code) in the generated rollup code. --- build/build-plugins.js | 1 + build/rollup.config.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'build') diff --git a/build/build-plugins.js b/build/build-plugins.js index 15a5378458..2e16e4f03b 100644 --- a/build/build-plugins.js +++ b/build/build-plugins.js @@ -163,6 +163,7 @@ const build = async plugin => { name: plugin, sourcemap: true, globals, + generatedCode: 'es2015', file: path.resolve(__dirname, `${pluginPath}/${pluginFilename}`) }) diff --git a/build/rollup.config.js b/build/rollup.config.js index 8cecec9aa2..c00438de25 100644 --- a/build/rollup.config.js +++ b/build/rollup.config.js @@ -43,7 +43,8 @@ const rollupConfig = { banner, file: path.resolve(__dirname, `../dist/js/${fileDest}.js`), format: ESM ? 'esm' : 'umd', - globals + globals, + generatedCode: 'es2015' }, external, plugins -- cgit v1.2.3