Use number of cpus - 1 for HappyPack
This commit is contained in:
parent
f034aee26e
commit
076d80081d
@ -1,4 +1,5 @@
|
|||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
const os = require("os");
|
||||||
const environment = process.env.NODE_ENV || "development";
|
const environment = process.env.NODE_ENV || "development";
|
||||||
const HappyPack = require("happypack");
|
const HappyPack = require("happypack");
|
||||||
const webpack = require("webpack");
|
const webpack = require("webpack");
|
||||||
@ -103,7 +104,7 @@ module.exports = (options = {}) => ({
|
|||||||
plugins: [
|
plugins: [
|
||||||
new HappyPack({
|
new HappyPack({
|
||||||
id: "ts",
|
id: "ts",
|
||||||
threads: 10,
|
threads: os.cpus().length - 1,
|
||||||
loaders: [{
|
loaders: [{
|
||||||
path: "ts-loader",
|
path: "ts-loader",
|
||||||
query: {
|
query: {
|
||||||
|
Reference in New Issue
Block a user