Fix error on single-CPU machine

HappyPack doesn't like 0 threads in config

Change-Id: I752a575142ca2844474291f2d8620a85566508b8
This commit is contained in:
Vadym Markov 2021-10-21 18:46:15 +03:00
parent f4f1a40884
commit 39e1f08496

View File

@ -133,7 +133,7 @@ module.exports = {
plugins: [
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new HappyPack({
threads: os.cpus().length - 1,
threads: os.cpus().length - 1 || 1,
id: 'jsx',
loaders: ['babel-loader?cacheDirectory'],
}),