From 076d80081daf90502b7a70e0494e05e7a8285a70 Mon Sep 17 00:00:00 2001 From: Asher Date: Wed, 6 Feb 2019 12:08:31 -0600 Subject: [PATCH] Use number of cpus - 1 for HappyPack --- scripts/webpack.general.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/webpack.general.config.js b/scripts/webpack.general.config.js index 3fadca26..be907d12 100644 --- a/scripts/webpack.general.config.js +++ b/scripts/webpack.general.config.js @@ -1,4 +1,5 @@ const path = require("path"); +const os = require("os"); const environment = process.env.NODE_ENV || "development"; const HappyPack = require("happypack"); const webpack = require("webpack"); @@ -103,7 +104,7 @@ module.exports = (options = {}) => ({ plugins: [ new HappyPack({ id: "ts", - threads: 10, + threads: os.cpus().length - 1, loaders: [{ path: "ts-loader", query: {