Skip to content

Commit 076d800

Browse files
committed
Use number of cpus - 1 for HappyPack
1 parent f034aee commit 076d800

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/webpack.general.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const path = require("path");
2+
const os = require("os");
23
const environment = process.env.NODE_ENV || "development";
34
const HappyPack = require("happypack");
45
const webpack = require("webpack");
@@ -103,7 +104,7 @@ module.exports = (options = {}) => ({
103104
plugins: [
104105
new HappyPack({
105106
id: "ts",
106-
threads: 10,
107+
threads: os.cpus().length - 1,
107108
loaders: [{
108109
path: "ts-loader",
109110
query: {

0 commit comments

Comments
 (0)