fix: terser-webpack-plugin hanging on WSL (#6732)

* fix: terser-webpack-plugin hanging on WSL

* nits

* Merge branch 'master' into terser-parallel-bug-wsl

Co-authored-by: Jack Zhao <jzhao@fb.com>
This commit is contained in:
Endilie Yacop Sucipto
2019-04-05 12:24:27 +07:00
committed by Ian Sutherland
parent ac15fae03e
commit 3e336d91e0
2 changed files with 5 additions and 1 deletions

View File

@@ -9,6 +9,7 @@
'use strict';
const fs = require('fs');
const isWsl = require('is-wsl');
const path = require('path');
const webpack = require('webpack');
const resolve = require('resolve');
@@ -222,7 +223,9 @@ module.exports = function(webpackEnv) {
},
// Use multi-process parallel running to improve the build speed
// Default number of concurrent runs: os.cpus().length - 1
parallel: true,
// Disabled on WSL (Windows Subsystem for Linux) due to an issue with Terser
// https://github.com/webpack-contrib/terser-webpack-plugin/issues/21
parallel: !isWsl,
// Enable file caching
cache: true,
sourceMap: shouldUseSourceMap,

View File

@@ -49,6 +49,7 @@
"fs-extra": "7.0.1",
"html-webpack-plugin": "4.0.0-beta.5",
"identity-obj-proxy": "3.0.0",
"is-wsl": "^1.1.0",
"jest": "24.7.1",
"jest-environment-jsdom-fourteen": "0.1.0",
"jest-resolve": "24.7.1",