Skip to content

Commit b6b4d6f

Browse files
committed
use availableParallellism
1 parent 6bbcebd commit b6b4d6f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dev-packages/rollup-utils/rollupParallel.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Runs rollup builds in parallel for configs that export an array.
55
* Usage: node rollupParallel.mjs <config-path>
66
*/
7-
import { cpus } from 'os';
7+
import { availableParallelism } from 'os';
88
import { pathToFileURL } from 'url';
99
import { resolve } from 'path';
1010
import { rollup } from 'rollup';
@@ -16,7 +16,7 @@ if (!configPath) {
1616
}
1717

1818
const { default: configs } = await import(pathToFileURL(resolve(configPath)).href);
19-
const concurrency = cpus().length;
19+
const concurrency = availableParallelism();
2020
const queue = [...configs];
2121
let done = 0;
2222

0 commit comments

Comments
 (0)