Skip to content

Commit 0b8282d

Browse files
authored
Merge pull request #33866 from storybookjs/norbert/make-dts-prod-builds-less-flaky
Build: Lower the number of parallel `dts` bundle generation at prod
2 parents 72d301d + 9f221dc commit 0b8282d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/build/utils/generate-types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export async function generateTypesFiles(cwd: string, data: BuildEntries) {
2121
// ...this way we do not bog down the main process/esbuild and can run them in parallel
2222
// we limit the number of concurrent processes to 3, because we don't want to overload the host machine
2323
// by trial and error, 3 seems to be the sweet spot between perf and consistency
24-
const limited = limit(10);
24+
const limited = limit(5);
2525
let processes: ReturnType<typeof spawn>[] = [];
2626

2727
await Promise.all(
@@ -83,7 +83,7 @@ export async function generateTypesFiles(cwd: string, data: BuildEntries) {
8383
processes.forEach((p) => p.kill());
8484
processes = [];
8585
process.exit(dtsProcess.exitCode || 1);
86-
} else if(!process.env.CI) {
86+
} else if (!process.env.CI) {
8787
console.log('✅ Generated types for', picocolors.cyan(join(DIR_REL, entryPoint)));
8888
}
8989
});

0 commit comments

Comments
 (0)