Use number of cpus - 1 for HappyPack

This commit is contained in:
Asher 2019-02-06 12:08:31 -06:00
parent f034aee26e
commit 076d80081d
No known key found for this signature in database
GPG Key ID: 7BB4BA9C783D2BBC
1 changed files with 2 additions and 1 deletions

View File

@ -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: {