mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-16 10:34:07 +02:00
Update to @rollup/plugin-babel
(#30742)
This commit is contained in:
@@ -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 = {
|
||||
|
Reference in New Issue
Block a user