mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-21 21:40:48 +00:00
use specific browserlist for esm build
This commit is contained in:
parent
ba9caacaa5
commit
c2b05dd7b5
@ -11,18 +11,42 @@ const ESM = process.env.ESM === 'true'
|
|||||||
let fileDest = `bootstrap${ESM ? '.esm' : ''}`
|
let fileDest = `bootstrap${ESM ? '.esm' : ''}`
|
||||||
const external = ['popper.js']
|
const external = ['popper.js']
|
||||||
const plugins = [
|
const plugins = [
|
||||||
babel({
|
babel(ESM ?
|
||||||
|
{
|
||||||
|
// Only transpile our source code
|
||||||
|
exclude: 'node_modules/**',
|
||||||
|
babelrc: false,
|
||||||
|
presets: [
|
||||||
|
[
|
||||||
|
'@babel/env',
|
||||||
|
{
|
||||||
|
loose: true,
|
||||||
|
modules: false,
|
||||||
|
targets: {
|
||||||
|
browsers: [
|
||||||
|
'Chrome >= 60',
|
||||||
|
'Safari >= 10.1',
|
||||||
|
'iOS >= 10.3',
|
||||||
|
'Firefox >= 54',
|
||||||
|
'Edge >= 15'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
} :
|
||||||
|
{
|
||||||
// Only transpile our source code
|
// Only transpile our source code
|
||||||
exclude: 'node_modules/**',
|
exclude: 'node_modules/**',
|
||||||
// Include only required helpers
|
// Include only required helpers
|
||||||
externalHelpersWhitelist: [
|
externalHelpersWhitelist: [
|
||||||
'defineProperties',
|
'defineProperties',
|
||||||
'createClass',
|
'createClass',
|
||||||
'inheritsLoose',
|
'inheritsLoose',
|
||||||
'defineProperty',
|
'defineProperty',
|
||||||
'objectSpread'
|
'objectSpread'
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
const globals = {
|
const globals = {
|
||||||
'popper.js': 'Popper'
|
'popper.js': 'Popper'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user