mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-07 04:54:24 +01:00
Update to @rollup/plugin-babel
(#30742)
This commit is contained in:
parent
c9cd3e4a08
commit
340236cbe4
@ -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 path = require('path')
|
||||||
const rollup = require('rollup')
|
const rollup = require('rollup')
|
||||||
const babel = require('rollup-plugin-babel')
|
const { babel } = require('@rollup/plugin-babel')
|
||||||
const banner = require('./banner.js')
|
const banner = require('./banner.js')
|
||||||
const babelHelpers = require('./babel-helpers.js')
|
|
||||||
|
|
||||||
const plugins = [
|
const plugins = [
|
||||||
babel({
|
babel({
|
||||||
// Only transpile our source code
|
// Only transpile our source code
|
||||||
exclude: 'node_modules/**',
|
exclude: 'node_modules/**',
|
||||||
// Include only required helpers
|
// Inline the required helpers in each file
|
||||||
externalHelpersWhitelist: babelHelpers
|
babelHelpers: 'inline'
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
const bsPlugins = {
|
const bsPlugins = {
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const babel = require('rollup-plugin-babel')
|
const { babel } = require('@rollup/plugin-babel')
|
||||||
const resolve = require('@rollup/plugin-node-resolve')
|
const resolve = require('@rollup/plugin-node-resolve')
|
||||||
const banner = require('./banner.js')
|
const banner = require('./banner.js')
|
||||||
const babelHelpers = require('./babel-helpers.js')
|
|
||||||
|
|
||||||
const BUNDLE = process.env.BUNDLE === 'true'
|
const BUNDLE = process.env.BUNDLE === 'true'
|
||||||
const ESM = process.env.ESM === 'true'
|
const ESM = process.env.ESM === 'true'
|
||||||
@ -15,8 +14,8 @@ const plugins = [
|
|||||||
babel({
|
babel({
|
||||||
// Only transpile our source code
|
// Only transpile our source code
|
||||||
exclude: 'node_modules/**',
|
exclude: 'node_modules/**',
|
||||||
// Include only required helpers
|
// Include the helpers in the bundle, at most one copy of each
|
||||||
externalHelpersWhitelist: babelHelpers
|
babelHelpers: 'bundled'
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
const globals = {
|
const globals = {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* eslint-env node */
|
/* eslint-env node */
|
||||||
|
|
||||||
const resolve = require('@rollup/plugin-node-resolve')
|
const resolve = require('@rollup/plugin-node-resolve')
|
||||||
const babel = require('rollup-plugin-babel')
|
const { babel } = require('@rollup/plugin-babel')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
input: 'js/tests/integration/bundle.js',
|
input: 'js/tests/integration/bundle.js',
|
||||||
@ -12,7 +12,8 @@ module.exports = {
|
|||||||
plugins: [
|
plugins: [
|
||||||
resolve(),
|
resolve(),
|
||||||
babel({
|
babel({
|
||||||
exclude: 'node_modules/**'
|
exclude: 'node_modules/**',
|
||||||
|
babelHelpers: 'bundled'
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* eslint-env node */
|
/* eslint-env node */
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const ip = require('ip')
|
const ip = require('ip')
|
||||||
const babel = require('rollup-plugin-babel')
|
const { babel } = require('@rollup/plugin-babel')
|
||||||
const istanbul = require('rollup-plugin-istanbul')
|
const istanbul = require('rollup-plugin-istanbul')
|
||||||
const resolve = require('@rollup/plugin-node-resolve')
|
const resolve = require('@rollup/plugin-node-resolve')
|
||||||
|
|
||||||
@ -9,7 +9,6 @@ const {
|
|||||||
browsers,
|
browsers,
|
||||||
browsersKeys
|
browsersKeys
|
||||||
} = require('./browsers')
|
} = require('./browsers')
|
||||||
const babelHelpers = require('../../build/babel-helpers.js')
|
|
||||||
|
|
||||||
const { env } = process
|
const { env } = process
|
||||||
const browserStack = env.BROWSER === 'true'
|
const browserStack = env.BROWSER === 'true'
|
||||||
@ -77,11 +76,8 @@ const conf = {
|
|||||||
babel({
|
babel({
|
||||||
// Only transpile our source code
|
// Only transpile our source code
|
||||||
exclude: 'node_modules/**',
|
exclude: 'node_modules/**',
|
||||||
// Include only required helpers
|
// Inline the required helpers in each file
|
||||||
externalHelpersWhitelist: babelHelpers,
|
babelHelpers: 'inline'
|
||||||
plugins: [
|
|
||||||
'@babel/plugin-proposal-object-rest-spread'
|
|
||||||
]
|
|
||||||
}),
|
}),
|
||||||
resolve()
|
resolve()
|
||||||
],
|
],
|
||||||
|
20
package-lock.json
generated
20
package-lock.json
generated
@ -985,6 +985,16 @@
|
|||||||
"fastq": "^1.6.0"
|
"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": {
|
"@rollup/plugin-commonjs": {
|
||||||
"version": "11.1.0",
|
"version": "11.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.1.0.tgz",
|
"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": {
|
"rollup-plugin-istanbul": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/rollup-plugin-istanbul/-/rollup-plugin-istanbul-2.0.1.tgz",
|
"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/core": "^7.9.6",
|
||||||
"@babel/plugin-proposal-object-rest-spread": "^7.9.6",
|
"@babel/plugin-proposal-object-rest-spread": "^7.9.6",
|
||||||
"@babel/preset-env": "^7.9.6",
|
"@babel/preset-env": "^7.9.6",
|
||||||
|
"@rollup/plugin-babel": "^5.0.2",
|
||||||
"@rollup/plugin-commonjs": "^11.1.0",
|
"@rollup/plugin-commonjs": "^11.1.0",
|
||||||
"@rollup/plugin-node-resolve": "^7.1.3",
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
||||||
"autoprefixer": "^9.8.0",
|
"autoprefixer": "^9.8.0",
|
||||||
@ -129,7 +130,6 @@
|
|||||||
"popper.js": "^1.16.0",
|
"popper.js": "^1.16.0",
|
||||||
"postcss-cli": "^7.1.1",
|
"postcss-cli": "^7.1.1",
|
||||||
"rollup": "^2.10.4",
|
"rollup": "^2.10.4",
|
||||||
"rollup-plugin-babel": "^4.4.0",
|
|
||||||
"rollup-plugin-istanbul": "^2.0.1",
|
"rollup-plugin-istanbul": "^2.0.1",
|
||||||
"serve": "^11.3.0",
|
"serve": "^11.3.0",
|
||||||
"shelljs": "^0.8.4",
|
"shelljs": "^0.8.4",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user