From 6107b731a7b460023d27430ad91a7858c1f793e2 Mon Sep 17 00:00:00 2001 From: krokerdile Date: Thu, 5 Dec 2024 17:59:15 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20webWorker=20=EC=BF=BC=EB=A6=AC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/frontend/src/hook/useTimer.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/frontend/src/hook/useTimer.ts b/apps/frontend/src/hook/useTimer.ts index 4f7e248a3..ded5984bd 100644 --- a/apps/frontend/src/hook/useTimer.ts +++ b/apps/frontend/src/hook/useTimer.ts @@ -24,9 +24,12 @@ export const useTimer = ({ initialTime, onComplete }: TimerConfig) => { } // 새 Worker 생성 - workerRef.current = new Worker(new URL('../workers/timer.worker.ts', import.meta.url), { - type: 'module', - }); + workerRef.current = new Worker( + new URL('../workers/timer.worker.ts?worker', import.meta.url), + { + type: 'module', + }, + ); // Worker 메시지 핸들러 workerRef.current.onmessage = (event) => {