mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-01-13 09:00:30 +08:00
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:
committed by
Ian Sutherland
parent
ac15fae03e
commit
3e336d91e0
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user