Skip to content

Commit

Permalink
fix: terser-webpack-plugin hanging on WSL (#6732)
Browse files Browse the repository at this point in the history
* fix: terser-webpack-plugin hanging on WSL

* nits

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

Co-authored-by: Jack Zhao <jzhao@fb.com>
  • Loading branch information
2 people authored and iansu committed Apr 5, 2019
1 parent ac15fae commit 3e336d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/react-scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 3e336d9

Please sign in to comment.