Skip to content

Commit

Permalink
ui: Disable terser parallelism
Browse files Browse the repository at this point in the history
In order to fix a frequent OOM issue in the CI, I tried to disable terser parallelism

Refs:  timarney/react-app-rewired#391 (comment)
  • Loading branch information
JBWatenbergScality committed Mar 30, 2021
1 parent 1b984b8 commit 202d13b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ui/config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);

0 comments on commit 202d13b

Please sign in to comment.