From 618d648238f73482d188fae9f209b49e06cd19cf Mon Sep 17 00:00:00 2001 From: endiliey Date: Mon, 21 Oct 2019 15:14:39 +0700 Subject: [PATCH] feat: upgrade terser & enable parallel in wsl --- packages/react-scripts/config/webpack.config.js | 5 +---- packages/react-scripts/package.json | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index c26012597a2..074bb0d6d5f 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -9,7 +9,6 @@ 'use strict'; const fs = require('fs'); -const isWsl = require('is-wsl'); const path = require('path'); const webpack = require('webpack'); const resolve = require('resolve'); @@ -255,9 +254,7 @@ module.exports = function(webpackEnv) { }, // Use multi-process parallel running to improve the build speed // Default number of concurrent runs: os.cpus().length - 1 - // 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, + parallel: true, // Enable file caching cache: true, sourceMap: shouldUseSourceMap, diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index a21817920a7..9d92e63c390 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -54,7 +54,6 @@ "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.9.0", "jest-environment-jsdom-fourteen": "0.1.0", "jest-resolve": "24.9.0", @@ -74,7 +73,7 @@ "sass-loader": "7.2.0", "semver": "6.3.0", "style-loader": "1.0.0", - "terser-webpack-plugin": "1.4.1", + "terser-webpack-plugin": "2.1.3", "ts-pnp": "1.1.4", "url-loader": "2.1.0", "webpack": "4.41.0",