From 2903e444bb15f166d7f8a51b704851f6139ac303 Mon Sep 17 00:00:00 2001 From: Haishan Date: Sun, 21 Oct 2018 15:40:18 +0800 Subject: [PATCH] build: optimize core-js modules importing --- .babelrc | 6 +++++- webpack.config.js | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.babelrc b/.babelrc index 61d1cd0..b2a6043 100644 --- a/.babelrc +++ b/.babelrc @@ -3,7 +3,11 @@ [ "@babel/preset-env", { - "modules": false + "modules": false, + "useBuiltIns": "usage", + "targets": { + "browsers": [">0.25%", "not ie 11", "not op_mini all"] + } } ], "@babel/preset-react" diff --git a/webpack.config.js b/webpack.config.js index ee50e9e..7922d9d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -22,7 +22,8 @@ const svgSpriteRule = { // ---- entry const entry = { - app: ['whatwg-fetch', '@babel/polyfill', './src/app.js'] + // app: ['whatwg-fetch', '@babel/polyfill', './src/app.js'] + app: ['whatwg-fetch', './src/app.js'] }; // ---- output