From 4d0f3aaf569437f1eb4bb052c4f12ef88e16ea54 Mon Sep 17 00:00:00 2001 From: Ryan Shaw Date: Thu, 8 Nov 2018 11:23:00 -0700 Subject: [PATCH] Fix webpack/react/uglify-es performance regression Closes: CORE-2126 See my comment on the github thread for details https://github.com/facebook/react/issues/13987#issuecomment-437100945 Test plan: * try canvas in a production environment * all pages that use React components should feel faster Change-Id: I3d9279784ef38bff1342ab6d20bbfefa697c92b2 Reviewed-on: https://gerrit.instructure.com/171633 Tested-by: Jenkins Reviewed-by: Clay Diffrient QA-Review: Ryan Shaw Product-Review: Ryan Shaw --- webpack.production.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webpack.production.config.js b/webpack.production.config.js index 09a4e65815666..b7e6f778b6256 100644 --- a/webpack.production.config.js +++ b/webpack.production.config.js @@ -28,7 +28,8 @@ if (!process.env.JS_BUILD_NO_UGLIFY) { parallel: true, uglifyOptions: { compress: { - sequences: false // prevents it from combining a bunch of statments with ","s so it is easier to set breakpoints + sequences: false, // prevents it from combining a bunch of statments with ","s so it is easier to set breakpoints + reduce_funcs: false // works around this bug: https://github.com/facebook/react/issues/13987#issuecomment-437100945 }, ecma: 5, output: {