From 202d13b632bb12a84f22238c5e14ac50be79f53b Mon Sep 17 00:00:00 2001 From: JBWatenbergScality <75977494+JBWatenbergScality@users.noreply.github.com> Date: Tue, 30 Mar 2021 13:47:08 +0200 Subject: [PATCH] ui: Disable terser parallelism In order to fix a frequent OOM issue in the CI, I tried to disable terser parallelism Refs: https://github.com/timarney/react-app-rewired/issues/391#issuecomment-571954944 --- ui/config-overrides.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ui/config-overrides.js b/ui/config-overrides.js index aa32857fc8..a0cff4eb62 100644 --- a/ui/config-overrides.js +++ b/ui/config-overrides.js @@ -27,9 +27,19 @@ const setWebpackPerformance = () => (config) => { return config; }; +/** + * After getting a lot of OOM issues while building the UI, we disabled terser parallelism + * Refs: https://github.com/timarney/react-app-rewired/issues/391#issuecomment-571954944 + */ +const terserDisableParallelism = () => config => { + config.optimization.minimizer[0].parallel=false; + return config; +}; + module.exports = override( useBabelRc(), useEslintRc(), addWebpackPlugin(new CompressionPlugin()), setWebpackPerformance(), + terserDisableParallelism() );