Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2020-05-26 19:20:15 +0300
committerXhmikosR <xhmikosr@gmail.com>2020-06-04 17:53:16 +0300
commit7a9bbd4489dc9343db2ae269037a9dc0ca2cb52d (patch)
tree96ce33815fbfea9a44f6c4225aa4a1cd12b710d7 /build
parentfdb596b2c32cff35da2ab6686e06f8558d6a05e8 (diff)
Backport #30742
Update to `@rollup/plugin-babel`
Diffstat (limited to 'build')
-rw-r--r--build/babel-helpers.js13
-rw-r--r--build/build-plugins.js15
-rw-r--r--build/rollup.config.js17
3 files changed, 15 insertions, 30 deletions
diff --git a/build/babel-helpers.js b/build/babel-helpers.js
deleted file mode 100644
index d444628f63..0000000000
--- a/build/babel-helpers.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict'
-
-// These are the babel helpers we whitelist
-const helpers = [
- 'createClass',
- 'createSuper',
- 'defineProperties',
- 'defineProperty',
- 'inheritsLoose',
- 'objectSpread2'
-]
-
-module.exports = helpers
diff --git a/build/build-plugins.js b/build/build-plugins.js
index 9e4f2e1c32..00ae91d5dd 100644
--- a/build/build-plugins.js
+++ b/build/build-plugins.js
@@ -9,19 +9,18 @@
'use strict'
-const path = require('path')
-const rollup = require('rollup')
-const babel = require('rollup-plugin-babel')
-const banner = require('./banner.js')
-const babelHelpers = require('./babel-helpers.js')
+const path = require('path')
+const rollup = require('rollup')
+const { babel } = require('@rollup/plugin-babel')
+const banner = require('./banner.js')
-const TEST = process.env.NODE_ENV === 'test'
+const TEST = process.env.NODE_ENV === 'test'
const plugins = [
babel({
// Only transpile our source code
exclude: 'node_modules/**',
- // Include only required helpers
- externalHelpersWhitelist: babelHelpers
+ // Inline the required helpers in each file
+ babelHelpers: 'inline'
})
]
const bsPlugins = {
diff --git a/build/rollup.config.js b/build/rollup.config.js
index 2d43194fe9..95e412f0e7 100644
--- a/build/rollup.config.js
+++ b/build/rollup.config.js
@@ -1,21 +1,20 @@
'use strict'
-const path = require('path')
-const babel = require('rollup-plugin-babel')
+const path = require('path')
+const { babel } = require('@rollup/plugin-babel')
const resolve = require('@rollup/plugin-node-resolve')
-const banner = require('./banner.js')
-const babelHelpers = require('./babel-helpers.js')
+const banner = require('./banner.js')
-const BUNDLE = process.env.BUNDLE === 'true'
+const BUNDLE = process.env.BUNDLE === 'true'
-let fileDest = 'bootstrap.js'
+let fileDest = 'bootstrap.js'
const external = ['jquery', 'popper.js']
const plugins = [
babel({
- // Only transpile our source code
+ // Only transpile our source code
exclude: 'node_modules/**',
- // Include only required helpers
- externalHelpersWhitelist: babelHelpers
+ // Include the helpers in the bundle, at most one copy of each
+ babelHelpers: 'bundled'
})
]
const globals = {