Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ export class JavaScriptOptimizerPlugin {
const workerPool = new Piscina({
filename: workerPath,
maxThreads: MAX_OPTIMIZE_WORKERS,
env: {
...process.env,
// Workaround for `TypeError [Error]: Cannot read property 'workerPort' of undefined`
// See: https://github.com/evanw/esbuild/commit/aa8b9ce8d462378f0f06ac52e83f6c32332dde38
ESBUILD_WORKER_THREADS: '0',
},
});

// Enqueue script optimization tasks and update compilation assets as the tasks complete
Expand Down