Skip to content

Commit

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

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

spinner.stop(
cached
Expand Down

0 comments on commit 702c30e

Please sign in to comment.