Skip to content

Commit

Permalink
rollup: specify generatedCode: 'es2015' (#35070)
Browse files Browse the repository at this point in the history
This will make use of `const` and modern features (which we are already using in our code) in the generated rollup code.
  • Loading branch information
XhmikosR authored Oct 4, 2021
1 parent 78e9b40 commit c81c645
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions build/build-plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ const build = async plugin => {
name: plugin,
sourcemap: true,
globals,
generatedCode: 'es2015',
file: path.resolve(__dirname, `${pluginPath}/${pluginFilename}`)
})

Expand Down
3 changes: 2 additions & 1 deletion build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion js/tests/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ const conf = {
output: {
format: 'iife',
name: 'bootstrapTest',
sourcemap: 'inline'
sourcemap: 'inline',
generatedCode: 'es2015'
}
}
}
Expand Down

0 comments on commit c81c645

Please sign in to comment.