terser-webpack-plugin
Advanced tools
Comparing version 5.3.11 to 5.3.12
@@ -111,2 +111,3 @@ "use strict"; | ||
* @property {() => string | undefined} [getMinimizerVersion] | ||
* @property {() => boolean | undefined} [supportsWorkerThreads] | ||
*/ | ||
@@ -365,3 +366,3 @@ | ||
numWorkers: numberOfWorkers, | ||
enableWorkerThreads: true | ||
enableWorkerThreads: typeof this.options.minimizer.implementation.supportsWorkerThreads !== "undefined" ? this.options.minimizer.implementation.supportsWorkerThreads() !== false : true | ||
}); | ||
@@ -368,0 +369,0 @@ |
@@ -273,2 +273,7 @@ "use strict"; | ||
/** | ||
* @returns {boolean | undefined} | ||
*/ | ||
terserMinify.supportsWorkerThreads = () => true; | ||
/* istanbul ignore next */ | ||
@@ -452,2 +457,7 @@ /** | ||
/** | ||
* @returns {boolean | undefined} | ||
*/ | ||
uglifyJsMinify.supportsWorkerThreads = () => true; | ||
/* istanbul ignore next */ | ||
@@ -537,2 +547,7 @@ /** | ||
/** | ||
* @returns {boolean | undefined} | ||
*/ | ||
swcMinify.supportsWorkerThreads = () => false; | ||
/* istanbul ignore next */ | ||
@@ -612,2 +627,7 @@ /** | ||
/** | ||
* @returns {boolean | undefined} | ||
*/ | ||
esbuildMinify.supportsWorkerThreads = () => false; | ||
/** | ||
* @template T | ||
@@ -614,0 +634,0 @@ * @param fn {(function(): any) | undefined} |
{ | ||
"name": "terser-webpack-plugin", | ||
"version": "5.3.11", | ||
"version": "5.3.12", | ||
"description": "Terser plugin for webpack", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -195,2 +195,3 @@ export = TerserPlugin; | ||
getMinimizerVersion?: (() => string | undefined) | undefined; | ||
supportsWorkerThreads?: (() => boolean | undefined) | undefined; | ||
}; | ||
@@ -197,0 +198,0 @@ type MinimizerImplementation<T> = BasicMinimizerImplementation<T> & |
@@ -54,2 +54,6 @@ export type Task<T> = () => Promise<T>; | ||
function getMinimizerVersion(): string | undefined; | ||
/** | ||
* @returns {boolean | undefined} | ||
*/ | ||
function supportsWorkerThreads(): boolean | undefined; | ||
} | ||
@@ -74,2 +78,6 @@ /** | ||
function getMinimizerVersion(): string | undefined; | ||
/** | ||
* @returns {boolean | undefined} | ||
*/ | ||
function supportsWorkerThreads(): boolean | undefined; | ||
} | ||
@@ -92,2 +100,6 @@ /** | ||
function getMinimizerVersion(): string | undefined; | ||
/** | ||
* @returns {boolean | undefined} | ||
*/ | ||
function supportsWorkerThreads(): boolean | undefined; | ||
} | ||
@@ -110,2 +122,6 @@ /** | ||
function getMinimizerVersion(): string | undefined; | ||
/** | ||
* @returns {boolean | undefined} | ||
*/ | ||
function supportsWorkerThreads(): boolean | undefined; | ||
} |
89123
1820