1
0
Fork 0
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:
XhmikosR 2020-05-26 06:14:12 +03:00 committed by GitHub
parent c9cd3e4a08
commit 340236cbe4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 23 additions and 42 deletions

View file

@ -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

View file

@ -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 = {

View file

@ -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 = {

View file

@ -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'
})
]
}

View file

@ -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
View file

@ -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",

View file

@ -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",