From 6ec09775ef3ff38d695c7e1582332947b90f922b Mon Sep 17 00:00:00 2001 From: Rafael Oleza Date: Tue, 21 Nov 2017 06:36:29 -0800 Subject: [PATCH] Upgrade uglify-es to 3.1.9 Reviewed By: davidaurelio Differential Revision: D6309485 fbshipit-source-id: 17d8b66a2a676a9a556509e28a48ee703fc6da89 --- packages/metro-bundler/package.json | 2 +- packages/metro-bundler/src/JSTransformer/worker/minify.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/metro-bundler/package.json b/packages/metro-bundler/package.json index 198c83a4..b4ac547b 100644 --- a/packages/metro-bundler/package.json +++ b/packages/metro-bundler/package.json @@ -48,7 +48,7 @@ "source-map": "^0.5.6", "temp": "0.8.3", "throat": "^4.1.0", - "uglify-es": "^3.1.0", + "uglify-es": "^3.1.9", "wordwrap": "^1.0.0", "write-file-atomic": "^1.2.0", "xpipe": "^1.0.5", diff --git a/packages/metro-bundler/src/JSTransformer/worker/minify.js b/packages/metro-bundler/src/JSTransformer/worker/minify.js index 41b5b436..2580ede5 100644 --- a/packages/metro-bundler/src/JSTransformer/worker/minify.js +++ b/packages/metro-bundler/src/JSTransformer/worker/minify.js @@ -50,6 +50,10 @@ function minify(inputCode: string, inputMap: ?MappingsMap) { includeSources: false, }, toplevel: true, + compress: { + // reduce_funcs inlines single-use function, which cause perf regressions. + reduce_funcs: false, + }, }); if (result.error) {