mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Update to @rollup/plugin-babel
(#30742)
This commit is contained in:
parent
c9cd3e4a08
commit
340236cbe4
7 changed files with 23 additions and 42 deletions
|
@ -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
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-env node */
|
||||
|
||||
const resolve = require('@rollup/plugin-node-resolve')
|
||||
const babel = require('rollup-plugin-babel')
|
||||
const { babel } = require('@rollup/plugin-babel')
|
||||
|
||||
module.exports = {
|
||||
input: 'js/tests/integration/bundle.js',
|
||||
|
@ -12,7 +12,8 @@ module.exports = {
|
|||
plugins: [
|
||||
resolve(),
|
||||
babel({
|
||||
exclude: 'node_modules/**'
|
||||
exclude: 'node_modules/**',
|
||||
babelHelpers: 'bundled'
|
||||
})
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-env node */
|
||||
const path = require('path')
|
||||
const ip = require('ip')
|
||||
const babel = require('rollup-plugin-babel')
|
||||
const { babel } = require('@rollup/plugin-babel')
|
||||
const istanbul = require('rollup-plugin-istanbul')
|
||||
const resolve = require('@rollup/plugin-node-resolve')
|
||||
|
||||
|
@ -9,7 +9,6 @@ const {
|
|||
browsers,
|
||||
browsersKeys
|
||||
} = require('./browsers')
|
||||
const babelHelpers = require('../../build/babel-helpers.js')
|
||||
|
||||
const { env } = process
|
||||
const browserStack = env.BROWSER === 'true'
|
||||
|
@ -77,11 +76,8 @@ const conf = {
|
|||
babel({
|
||||
// Only transpile our source code
|
||||
exclude: 'node_modules/**',
|
||||
// Include only required helpers
|
||||
externalHelpersWhitelist: babelHelpers,
|
||||
plugins: [
|
||||
'@babel/plugin-proposal-object-rest-spread'
|
||||
]
|
||||
// Inline the required helpers in each file
|
||||
babelHelpers: 'inline'
|
||||
}),
|
||||
resolve()
|
||||
],
|
||||
|
|
20
package-lock.json
generated
20
package-lock.json
generated
|
@ -985,6 +985,16 @@
|
|||
"fastq": "^1.6.0"
|
||||
}
|
||||
},
|
||||
"@rollup/plugin-babel": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.0.2.tgz",
|
||||
"integrity": "sha512-GiL7jL+FGppzQ1Sn4y2ER4UYXlgXFFEt+sHm4WJEzQwI76Yf9oy2QDqIvcon6xApZWlik3L8fezRGC6Mj2vRXg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-module-imports": "^7.7.4",
|
||||
"@rollup/pluginutils": "^3.0.8"
|
||||
}
|
||||
},
|
||||
"@rollup/plugin-commonjs": {
|
||||
"version": "11.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.1.0.tgz",
|
||||
|
@ -9878,16 +9888,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"rollup-plugin-babel": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.4.0.tgz",
|
||||
"integrity": "sha512-Lek/TYp1+7g7I+uMfJnnSJ7YWoD58ajo6Oarhlex7lvUce+RCKRuGRSgztDO3/MF/PuGKmUL5iTHKf208UNszw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-module-imports": "^7.0.0",
|
||||
"rollup-pluginutils": "^2.8.1"
|
||||
}
|
||||
},
|
||||
"rollup-plugin-istanbul": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/rollup-plugin-istanbul/-/rollup-plugin-istanbul-2.0.1.tgz",
|
||||
|
|
|
@ -96,6 +96,7 @@
|
|||
"@babel/core": "^7.9.6",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.9.6",
|
||||
"@babel/preset-env": "^7.9.6",
|
||||
"@rollup/plugin-babel": "^5.0.2",
|
||||
"@rollup/plugin-commonjs": "^11.1.0",
|
||||
"@rollup/plugin-node-resolve": "^7.1.3",
|
||||
"autoprefixer": "^9.8.0",
|
||||
|
@ -129,7 +130,6 @@
|
|||
"popper.js": "^1.16.0",
|
||||
"postcss-cli": "^7.1.1",
|
||||
"rollup": "^2.10.4",
|
||||
"rollup-plugin-babel": "^4.4.0",
|
||||
"rollup-plugin-istanbul": "^2.0.1",
|
||||
"serve": "^11.3.0",
|
||||
"shelljs": "^0.8.4",
|
||||
|
|
Loading…
Reference in a new issue