mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-03 11:22:30 +02:00
fix(v2): don't run terser in parallel for WSL (#1326)
* fix(v2): don't run terser in parallel for WSL * nits * Update base.js * Update base.js
This commit is contained in:
parent
6fd9253328
commit
c33e874e1c
2 changed files with 5 additions and 1 deletions
|
@ -10,6 +10,7 @@ const CSSExtractPlugin = require('mini-css-extract-plugin');
|
|||
const rehypePrism = require('@mapbox/rehype-prism');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const path = require('path');
|
||||
const isWsl = require('is-wsl');
|
||||
|
||||
const mdLoader = require.resolve('./loaders/markdown');
|
||||
|
||||
|
@ -189,7 +190,9 @@ module.exports = function createBaseConfig(props, isServer) {
|
|||
config.optimization.minimizer([
|
||||
new TerserPlugin({
|
||||
cache: true,
|
||||
parallel: true,
|
||||
// We can't run in parallel for WSL due to upstream bug
|
||||
// https://github.com/webpack-contrib/terser-webpack-plugin/issues/21
|
||||
parallel: !isWsl,
|
||||
sourceMap: true,
|
||||
terserOptions: {
|
||||
ecma: 6,
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
"fs-extra": "^7.0.0",
|
||||
"globby": "^9.1.0",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"is-wsl": "^1.1.0",
|
||||
"loader-utils": "^1.1.0",
|
||||
"lodash": "^4.17.11",
|
||||
"mini-css-extract-plugin": "^0.4.1",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue