Skip to content

Commit

Permalink
Filter --expose-gc and --max-semi-space-size execArgv Node args from …
Browse files Browse the repository at this point in the history
…workers

This fixes parcel-bundler#9398.
  • Loading branch information
davidjb committed Nov 23, 2023
1 parent d741b10 commit 09df67d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/workers/src/Worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ export default class Worker extends EventEmitter {
let filteredArgs = [];
if (process.execArgv) {
filteredArgs = process.execArgv.filter(
v => !/^--(debug|inspect|no-opt|max-old-space-size=)/.test(v),
v =>
!/^--(debug|inspect|no-opt|max-old-space-size=|max-semi-space-size=|expose-gc)/.test(
v,
),
);

for (let i = 0; i < filteredArgs.length; i++) {
Expand Down

0 comments on commit 09df67d

Please sign in to comment.