Skip to content

Commit

Permalink
fix: multiple process lead build slow, set default 2
Browse files Browse the repository at this point in the history
  • Loading branch information
hubcarl committed Aug 21, 2018
1 parent 7f9b335 commit a8f4d6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions config/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ const WebpackTool = require('webpack-tool');
const webpack = WebpackTool.webpack;
const chalk = require('chalk');
const utils = require('../utils/utils');
const WORKERS = os.cpus().length - 1;
const UGLIFYJS_WORKERS = WORKERS > 8 ? 8 : WORKERS;

exports.hot = {
enable: true,
Expand Down Expand Up @@ -106,7 +104,7 @@ exports.uglifyJs = {
name: 'uglifyjs-webpack-plugin',
args: {
cache: true,
parallel: UGLIFYJS_WORKERS,
parallel: 2,
sourceMap: true,
uglifyOptions: {
warnings: false,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "easywebpack",
"version": "4.5.0",
"version": "4.5.1",
"description": "基于 Webpack 的前端构建工程化解决方案",
"keywords": [
"webpack",
Expand Down

0 comments on commit a8f4d6e

Please sign in to comment.