From 8876e3665857d67db36bb56d8cb4d9a2fb4011ac Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Wed, 25 Apr 2018 09:28:21 -0700 Subject: [PATCH] Disable function inlining Work around for https://github.com/mishoo/UglifyJS2/issues/2842 --- config/webpack.library.js | 8 +++++++- config/webpack.prod.js | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/config/webpack.library.js b/config/webpack.library.js index 4435486e..262fd7bf 100644 --- a/config/webpack.library.js +++ b/config/webpack.library.js @@ -42,7 +42,13 @@ module.exports = { }), new UglifyJsPlugin({ include: /\.min\.js$/, - parallel: true + parallel: true, + uglifyOptions: { + compress: { + // Workaround: https://github.com/mishoo/UglifyJS2/issues/2842 + inline: false + } + } }) ], entry: { diff --git a/config/webpack.prod.js b/config/webpack.prod.js index 4eed4544..e9ae9420 100644 --- a/config/webpack.prod.js +++ b/config/webpack.prod.js @@ -22,7 +22,13 @@ const config = merge(common, { new UglifyJsPlugin({ // TODO: Is this needed with the devtool setting above? sourceMap: true, - parallel: true + parallel: true, + uglifyOptions: { + compress: { + // Workaround: https://github.com/mishoo/UglifyJS2/issues/2842 + inline: false + } + } }), new workboxPlugin.GenerateSW({ // Note: CloudFlare is configued to not cache this file, as suggested in the: