From 2a627aebd167011b7a1fcb8da4edc8560b43bae7 Mon Sep 17 00:00:00 2001 From: ZxBing0066 Date: Wed, 10 Jun 2020 15:16:54 +0800 Subject: [PATCH] clean regenerator to no-polyfill bundle --- babel-without-polyfill.config.json | 7 ++++++- webpack.config.js | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/babel-without-polyfill.config.json b/babel-without-polyfill.config.json index be91d70..43cdbcb 100644 --- a/babel-without-polyfill.config.json +++ b/babel-without-polyfill.config.json @@ -11,7 +11,12 @@ "@babel/preset-typescript" ], "plugins": [ - "@babel/plugin-transform-runtime", + [ + "@babel/plugin-transform-runtime", + { + "regenerator": false + } + ], "@babel/plugin-proposal-class-properties", "@babel/plugin-proposal-object-rest-spread", "@babel/plugin-proposal-optional-chaining", diff --git a/webpack.config.js b/webpack.config.js index a9b7105..b609558 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,7 +6,8 @@ const isDevelopment = env === 'development'; const analyzer = process.env.ANALYZER; const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; -const babelOptions = require('./babel.config.json'); +let babelOptions = require('./babel.config.json'); +// babelOptions = require('./babel-without-polyfill.config.json'); const webpackConfig = { entry: {