From 5aa79bd44007d7d8c7014c14b5704ebb85f69192 Mon Sep 17 00:00:00 2001 From: thinkinggis Date: Fri, 20 Dec 2019 10:08:01 +0800 Subject: [PATCH] chore: babel useBuiltIns usage --- babel.config.js | 8 ++------ package.json | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/babel.config.js b/babel.config.js index 90660a79a9..28d2246145 100644 --- a/babel.config.js +++ b/babel.config.js @@ -42,7 +42,8 @@ module.exports = api => { [ '@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 // @see https://github.com/rollup/rollup-plugin-babel#modules modules: (isCDNBundle || isESModule) ? false : 'auto' @@ -66,11 +67,6 @@ module.exports = api => { legacy: true } ], - [ '@babel/plugin-transform-runtime', - { - regenerator: true - } - ], [ '@babel/plugin-proposal-class-properties', { diff --git a/package.json b/package.json index eee9f9911a..c44f01e9da 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4", "@babel/plugin-proposal-object-rest-spread": "^7.7.4", "@babel/plugin-proposal-optional-chaining": "^7.6.0", - "@babel/plugin-transform-runtime": "^7.7.6", "@babel/preset-env": "^7.5.5", "@babel/preset-react": "^7.0.0", "@babel/preset-typescript": "^7.3.3",