Skip to content

Commit

Permalink
Pass the current URL
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp committed Nov 8, 2022
1 parent 8cc8704 commit 4948990
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/integrations/image/src/vendor/squoosh/image-pool.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { isMainThread } from 'node:worker_threads';
import { cpus } from 'os';
import { fileURLToPath } from 'url';
import type { OutputFormat } from '../../loaders/index.js';
import execOnce from '../../utils/execOnce.js';
import WorkerPool from '../../utils/workerPool.js';
Expand All @@ -12,7 +13,7 @@ const getWorker = execOnce(
// There will be at most 7 workers needed since each worker will take
// at least 1 operation type.
Math.max(1, Math.min(cpus().length - 1, 7)),
'./node_modules/@astrojs/image/dist/vendor/squoosh/image-pool.js'
fileURLToPath(import.meta.url)
);
}
)
Expand Down

0 comments on commit 4948990

Please sign in to comment.