mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-24 05:05:53 +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,
|
||||
|
||||
Reference in New Issue
Block a user