Craco + CI

This commit is contained in:
Patrick Fic
2021-03-02 16:44:33 -08:00
parent 99b5d7b337
commit 420afc5152
3 changed files with 176 additions and 4 deletions

22
client/craco.config.js Normal file
View File

@@ -0,0 +1,22 @@
// craco.config.js
const TerserPlugin = require("terser-webpack-plugin");
module.exports = {
webpack: {
configure: (webpackConfig) => ({
...webpackConfig,
optimization: {
...webpackConfig.optimization,
// Workaround for CircleCI bug caused by the number of CPUs shown
// https://github.com/facebook/create-react-app/issues/8320
minimizer: webpackConfig.optimization.minimizer.map((item) => {
if (item instanceof TerserPlugin) {
item.options.parallel = 2;
}
return item;
}),
},
}),
},
};