From 2dd42feb8273b4cfb3dece32403bb1a9ebea47d5 Mon Sep 17 00:00:00 2001 From: "lkh14011424@gmail.com" Date: Tue, 16 Jul 2024 17:42:10 +0900 Subject: [PATCH] =?UTF-8?q?[feat#7]=20web=20worker=20import=EB=AC=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/worker.ts | 4 +--- src/workers/worker.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/utils/worker.ts b/src/utils/worker.ts index f81ac78..0d7b49d 100644 --- a/src/utils/worker.ts +++ b/src/utils/worker.ts @@ -1,4 +1,2 @@ -// eslint-disable-next-line import/extensions -import Worker from "../workers/worker.ts?worker" +export const worker = new Worker(new URL("../workers/worker.ts?worker", import.meta.url)) -export const worker = new Worker() diff --git a/src/workers/worker.ts b/src/workers/worker.ts index fbb0ae5..a6bb209 100644 --- a/src/workers/worker.ts +++ b/src/workers/worker.ts @@ -4,7 +4,7 @@ interface e { } self.onmessage = (e) => { - const { type, data } = e.data + const { type } = e.data switch (type) { case "init": setInterval(() => {