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 06:14:12 +0300
committerGitHub <noreply@github.com>2020-05-26 06:14:12 +0300
commit340236cbe4a5bfb3fb3583f177ba7a493bb4f21c (patch)
tree6fc829896c5ee381a7457244d3d100012b5eef01 /build
parentc9cd3e4a083a69bcd2eefb1d1b62e6106e2ce469 (diff)
Update to `@rollup/plugin-babel` (#30742)
Diffstat (limited to 'build')
-rw-r--r--build/babel-helpers.js14
-rw-r--r--build/build-plugins.js7
-rw-r--r--build/rollup.config.js7
3 files changed, 6 insertions, 22 deletions
diff --git a/build/babel-helpers.js b/build/babel-helpers.js
deleted file mode 100644
index 30a5156771..0000000000
--- a/build/babel-helpers.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict'
-
-// These are the babel helpers we whitelist
-const helpers = [
- 'createClass',
- 'createSuper',
- 'defineProperties',
- 'defineProperty',
- 'getPrototypeOf',
- 'inheritsLoose',
- 'objectSpread2'
-]
-
-module.exports = helpers
diff --git a/build/build-plugins.js b/build/build-plugins.js
index 44d155c4f9..c57c53ce4e 100644
--- a/build/build-plugins.js
+++ b/build/build-plugins.js
@@ -11,16 +11,15 @@
const path = require('path')
const rollup = require('rollup')
-const babel = require('rollup-plugin-babel')
+const { babel } = require('@rollup/plugin-babel')
const banner = require('./banner.js')
-const babelHelpers = require('./babel-helpers.js')
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 d32346e101..a792502172 100644
--- a/build/rollup.config.js
+++ b/build/rollup.config.js
@@ -1,10 +1,9 @@
'use strict'
const path = require('path')
-const babel = require('rollup-plugin-babel')
+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 BUNDLE = process.env.BUNDLE === 'true'
const ESM = process.env.ESM === 'true'
@@ -15,8 +14,8 @@ const plugins = [
babel({
// 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 = {