diff options
author | XhmikosR <xhmikosr@gmail.com> | 2021-10-04 19:46:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 19:46:07 +0300 |
commit | c81c64539418a42ec19c9c0c7694bf291d9c85b8 (patch) | |
tree | 6448fdc67e7574182db32048cfd7dcd6a4bb92c8 | |
parent | 78e9b402df84042920d9f2a61e86fc3bb0b4dcea (diff) |
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.
-rw-r--r-- | build/build-plugins.js | 1 | ||||
-rw-r--r-- | build/rollup.config.js | 3 | ||||
-rw-r--r-- | js/tests/karma.conf.js | 3 |
3 files changed, 5 insertions, 2 deletions
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 diff --git a/js/tests/karma.conf.js b/js/tests/karma.conf.js index 1d4b0d3e4d..d85f2441c3 100644 --- a/js/tests/karma.conf.js +++ b/js/tests/karma.conf.js @@ -98,7 +98,8 @@ const conf = { output: { format: 'iife', name: 'bootstrapTest', - sourcemap: 'inline' + sourcemap: 'inline', + generatedCode: 'es2015' } } } |