From d800c6a15f164cc7b36b6720d3aea80b3b39a9bf Mon Sep 17 00:00:00 2001 From: sliterok <12751644+sliterok@users.noreply.github.com> Date: Wed, 13 Mar 2024 11:40:24 +0100 Subject: [PATCH] fix worker url --- src/db/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/helpers.ts b/src/db/helpers.ts index e8650af..de2e690 100644 --- a/src/db/helpers.ts +++ b/src/db/helpers.ts @@ -5,7 +5,7 @@ let worker: Worker export function getWorker() { if (!worker) - worker = new Worker(new URL(import.meta.env.MODE === 'production' ? 'sw.js' : '/dev-sw.js?dev-sw', import.meta.url), { + worker = new Worker(import.meta.env.MODE === 'production' ? 'sw.js' : '/dev-sw.js?dev-sw', { type: import.meta.env.MODE === 'production' ? 'classic' : 'module', }) return worker