mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-22 06:39:52 +00:00
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.
This commit is contained in:
parent
78e9b402df
commit
c81c645394
@ -163,6 +163,7 @@ const build = async plugin => {
|
|||||||
name: plugin,
|
name: plugin,
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
globals,
|
globals,
|
||||||
|
generatedCode: 'es2015',
|
||||||
file: path.resolve(__dirname, `${pluginPath}/${pluginFilename}`)
|
file: path.resolve(__dirname, `${pluginPath}/${pluginFilename}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -43,7 +43,8 @@ const rollupConfig = {
|
|||||||
banner,
|
banner,
|
||||||
file: path.resolve(__dirname, `../dist/js/${fileDest}.js`),
|
file: path.resolve(__dirname, `../dist/js/${fileDest}.js`),
|
||||||
format: ESM ? 'esm' : 'umd',
|
format: ESM ? 'esm' : 'umd',
|
||||||
globals
|
globals,
|
||||||
|
generatedCode: 'es2015'
|
||||||
},
|
},
|
||||||
external,
|
external,
|
||||||
plugins
|
plugins
|
||||||
|
@ -98,7 +98,8 @@ const conf = {
|
|||||||
output: {
|
output: {
|
||||||
format: 'iife',
|
format: 'iife',
|
||||||
name: 'bootstrapTest',
|
name: 'bootstrapTest',
|
||||||
sourcemap: 'inline'
|
sourcemap: 'inline',
|
||||||
|
generatedCode: 'es2015'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user