From db9dde85e9c7e86f16467dbfa2f8c514987b4be2 Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Tue, 10 Jul 2018 17:16:49 -0500 Subject: [PATCH] preserve `GeneratorFunction` instead of all function names --- make-webpack-config.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/make-webpack-config.js b/make-webpack-config.js index c9be0b23..9e98e72a 100644 --- a/make-webpack-config.js +++ b/make-webpack-config.js @@ -71,10 +71,13 @@ module.exports = function(rules, options) { plugins.push( new UglifyJsPlugin({ uglifyOptions: { - mangle: specialOptions.mangle, + mangle: specialOptions.mangle ? { + reserved: ["GeneratorFunction"] + } : false, + compress: specialOptions.mangle, beautify: !specialOptions.mangle, - keep_fnames: true }, + sourceMap: true, }), new webpack.LoaderOptionsPlugin({