From 702c30ec4f5e29818471e905c67eb635ad6f8c24 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Sun, 5 Jan 2025 03:17:44 +0800 Subject: [PATCH] refactor(cli): always use worker --- packages/cli/index.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/cli/index.ts b/packages/cli/index.ts index 6dcbdc9..77a1e96 100644 --- a/packages/cli/index.ts +++ b/packages/cli/index.ts @@ -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