From 14ead1a62fa42f22afff68ff73e44099608a8d10 Mon Sep 17 00:00:00 2001
From: Andrew Grekov
Date: Wed, 6 Mar 2019 02:02:49 +0300
Subject: [PATCH] Fixes calculating number of threads for HappyPack (#10)
---
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 3cd93164..26587519 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: {