Skip to content

Commit

Permalink
fix worker url
Browse files Browse the repository at this point in the history
  • Loading branch information
sliterok committed Mar 13, 2024
1 parent 9284969 commit d800c6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/db/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d800c6a

Please sign in to comment.