SharedWorker not working due to query string added to file #9928
Unanswered
krpatter-intc
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a shared worker created like so:
this.worker = new SharedWorker(new URL("worker.ts", import.meta.url), {type: "module"})However, when parcel fetches the
.tsfile it adds a query string ?1724708901069 (a timestamp looking number, example: worker.ts?1724708901069) (that I can't figure out how to get rid of). This breaks the SharedWorker as the browser considers it a different worker -- and a new one gets created. Thenew URLHAS to be created in the same line as the shared worker due to the issue referenced below (and in some other related issues I saw).The docs explicitly mention that SharedWorker is supported, but there's no recipe given...anyone out there know how to work around / fix this?
Related issue:
import.meta.resolve(…)#8924Beta Was this translation helpful? Give feedback.
All reactions