mirror of https://gitee.com/antv-l7/antv-l7
chore: babel useBuiltIns usage
This commit is contained in:
parent
6fa20f16e7
commit
5aa79bd440
|
@ -42,7 +42,8 @@ module.exports = api => {
|
||||||
[
|
[
|
||||||
'@babel/env',
|
'@babel/env',
|
||||||
{
|
{
|
||||||
useBuiltIns: isCDNBundle ? 'usage' : false,
|
// https://babeljs.io/docs/en/babel-preset-env#usebuiltins
|
||||||
|
useBuiltIns: 'usage',
|
||||||
// set `modules: false` when building CDN bundle, let rollup do commonjs works
|
// set `modules: false` when building CDN bundle, let rollup do commonjs works
|
||||||
// @see https://github.com/rollup/rollup-plugin-babel#modules
|
// @see https://github.com/rollup/rollup-plugin-babel#modules
|
||||||
modules: (isCDNBundle || isESModule) ? false : 'auto'
|
modules: (isCDNBundle || isESModule) ? false : 'auto'
|
||||||
|
@ -66,11 +67,6 @@ module.exports = api => {
|
||||||
legacy: true
|
legacy: true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
[ '@babel/plugin-transform-runtime',
|
|
||||||
{
|
|
||||||
regenerator: true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
'@babel/plugin-proposal-class-properties',
|
'@babel/plugin-proposal-class-properties',
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
|
||||||
"@babel/plugin-proposal-object-rest-spread": "^7.7.4",
|
"@babel/plugin-proposal-object-rest-spread": "^7.7.4",
|
||||||
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
|
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
|
||||||
"@babel/plugin-transform-runtime": "^7.7.6",
|
|
||||||
"@babel/preset-env": "^7.5.5",
|
"@babel/preset-env": "^7.5.5",
|
||||||
"@babel/preset-react": "^7.0.0",
|
"@babel/preset-react": "^7.0.0",
|
||||||
"@babel/preset-typescript": "^7.3.3",
|
"@babel/preset-typescript": "^7.3.3",
|
||||||
|
|
Loading…
Reference in New Issue