Skip to content

Commit

Permalink
Revert "refactor(cli): always use worker"
Browse files Browse the repository at this point in the history
This reverts commit 702c30e.
  • Loading branch information
johnsoncodehk committed Jan 4, 2025
1 parent a0c7b85 commit 951bbe3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,13 @@ class Project {
process.exit(1);
}

await Promise.all(new Array(threads).fill(0).map(() => {
return startWorker(worker.create());
}));
if (threads === 1) {
await startWorker(worker.createLocal() as any);
} else {
await Promise.all(new Array(threads).fill(0).map(() => {
return startWorker(worker.create());
}));
}

spinner.stop(
cached
Expand Down

0 comments on commit 951bbe3

Please sign in to comment.