mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-12 00:37:19 +00:00
Use __filename for worker instead
This commit is contained in:
@@ -109,7 +109,7 @@ async function processFiles(files) {
|
|||||||
await fsp.mkdir(program.outputDir, { recursive: true });
|
await fsp.mkdir(program.outputDir, { recursive: true });
|
||||||
const pool = Array.from(
|
const pool = Array.from(
|
||||||
{ length: cpus().length },
|
{ length: cpus().length },
|
||||||
() => new Worker(process.argv[1])
|
() => new Worker(__filename)
|
||||||
);
|
);
|
||||||
let i = 0;
|
let i = 0;
|
||||||
const jobs = [];
|
const jobs = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user