23 lines
601 B
JavaScript
23 lines
601 B
JavaScript
// 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;
|
|
}),
|
|
},
|
|
}),
|
|
},
|
|
};
|