1
0
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:
XhmikosR
2020-05-26 06:14:12 +03:00
committed by GitHub
parent c9cd3e4a08
commit 340236cbe4
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 = {