Skip to content

Commit c81c645

Browse files
authored
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.
1 parent 78e9b40 commit c81c645

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

build/build-plugins.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ const build = async plugin => {
163163
name: plugin,
164164
sourcemap: true,
165165
globals,
166+
generatedCode: 'es2015',
166167
file: path.resolve(__dirname, `${pluginPath}/${pluginFilename}`)
167168
})
168169

build/rollup.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ const rollupConfig = {
4343
banner,
4444
file: path.resolve(__dirname, `../dist/js/${fileDest}.js`),
4545
format: ESM ? 'esm' : 'umd',
46-
globals
46+
globals,
47+
generatedCode: 'es2015'
4748
},
4849
external,
4950
plugins

js/tests/karma.conf.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ const conf = {
9898
output: {
9999
format: 'iife',
100100
name: 'bootstrapTest',
101-
sourcemap: 'inline'
101+
sourcemap: 'inline',
102+
generatedCode: 'es2015'
102103
}
103104
}
104105
}

0 commit comments

Comments
 (0)