NuxtN
Nuxt8mo ago
3 replies
kogratte

Load worker

Hey there! I'm trying to use a worker I need to load this way: new Worker(MyWorkerSrc?param1=x&param2=y), x and y being defined dynamically.
Then, the worker should use url search params to instantiate what needs to be.
My worker currently leaves in @/assets/worker/myWorker.ts.
How can I make sure that:
- Worker is being compiled
- Worker is available in output
- Worker will be loaded using the new Worker() call
?
Was this page helpful?