From 6bfeadc8da48c7e7a59a3a17f0f266b683aa71f2 Mon Sep 17 00:00:00 2001
From: Andrew Grekov
Date: Tue, 5 Mar 2019 23:46:35 +0300
Subject: [PATCH] Fixes calculate num of cpu threads for HappyPack
---
scripts/webpack.general.config.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/webpack.general.config.js b/scripts/webpack.general.config.js
index 3cd931644c62..26587519a48d 100644
--- a/scripts/webpack.general.config.js
+++ b/scripts/webpack.general.config.js
@@ -105,7 +105,7 @@ module.exports = (options = {}) => ({
plugins: [
new HappyPack({
id: "ts",
- threads: os.cpus().length - 1,
+ threads: Math.max(os.cpus().length - 1, 1),
loaders: [{
path: "ts-loader",
query: {