mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
parent
d8691fcd5a
commit
f3aed77dc7
13
build/babel-helpers.js
Normal file
13
build/babel-helpers.js
Normal file
@ -0,0 +1,13 @@
|
||||
'use strict'
|
||||
|
||||
// These are the babel helpers we whitelist
|
||||
const helpers = [
|
||||
'createClass',
|
||||
'createSuper',
|
||||
'defineProperties',
|
||||
'defineProperty',
|
||||
'inheritsLoose',
|
||||
'objectSpread2'
|
||||
]
|
||||
|
||||
module.exports = helpers
|
@ -11,19 +11,15 @@ const path = require('path')
|
||||
const rollup = require('rollup')
|
||||
const babel = require('rollup-plugin-babel')
|
||||
const banner = require('./banner.js')
|
||||
const babelHelpers = require('./babel-helpers.js')
|
||||
|
||||
const TEST = process.env.NODE_ENV === 'test'
|
||||
const plugins = [
|
||||
babel({
|
||||
exclude: 'node_modules/**', // Only transpile our source code
|
||||
externalHelpersWhitelist: [ // Include only required helpers
|
||||
'defineProperties',
|
||||
'createClass',
|
||||
'createSuper',
|
||||
'inheritsLoose',
|
||||
'defineProperty',
|
||||
'objectSpread2'
|
||||
]
|
||||
// Only transpile our source code
|
||||
exclude: 'node_modules/**',
|
||||
// Include only required helpers
|
||||
externalHelpersWhitelist: babelHelpers
|
||||
})
|
||||
]
|
||||
const bsPlugins = {
|
||||
|
@ -4,6 +4,7 @@ const path = require('path')
|
||||
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'
|
||||
|
||||
@ -11,15 +12,10 @@ let fileDest = 'bootstrap.js'
|
||||
const external = ['jquery', 'popper.js']
|
||||
const plugins = [
|
||||
babel({
|
||||
exclude: 'node_modules/**', // Only transpile our source code
|
||||
externalHelpersWhitelist: [ // Include only required helpers
|
||||
'defineProperties',
|
||||
'createClass',
|
||||
'createSuper',
|
||||
'inheritsLoose',
|
||||
'defineProperty',
|
||||
'objectSpread2'
|
||||
]
|
||||
// Only transpile our source code
|
||||
exclude: 'node_modules/**',
|
||||
// Include only required helpers
|
||||
externalHelpersWhitelist: babelHelpers
|
||||
})
|
||||
]
|
||||
const globals = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user