]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
rollup: specify `generatedCode: 'es2015'` (#35070)
authorXhmikosR <xhmikosr@gmail.com>
Mon, 4 Oct 2021 16:46:07 +0000 (19:46 +0300)
committerGitHub <noreply@github.com>
Mon, 4 Oct 2021 16:46:07 +0000 (19:46 +0300)
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
build/rollup.config.js
js/tests/karma.conf.js

index 15a53784584bc9678634951c286bbf52618ff146..2e16e4f03b815db769553fe67d5ba80e050aa970 100644 (file)
@@ -163,6 +163,7 @@ const build = async plugin => {
     name: plugin,
     sourcemap: true,
     globals,
+    generatedCode: 'es2015',
     file: path.resolve(__dirname, `${pluginPath}/${pluginFilename}`)
   })
 
index 8cecec9aa24aefc3a77632f3489c68bec979e1b7..c00438de25ec5bc99ccb25aa05b95f21465ff893 100644 (file)
@@ -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
index 1d4b0d3e4d676d63818d412c0eba921624e50dde..d85f2441c3980f2625d78111230e15b4074b2784 100644 (file)
@@ -98,7 +98,8 @@ const conf = {
     output: {
       format: 'iife',
       name: 'bootstrapTest',
-      sourcemap: 'inline'
+      sourcemap: 'inline',
+      generatedCode: 'es2015'
     }
   }
 }