💡 Adding a custom webworker with Vite + TypeScript #553
RolandoAndrade
started this conversation in
Show and tell
Replies: 1 comment
-
Great solution! Can you explain what your |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys. I'm just writing because maybe somebody had a problem integrating webworkers with Vite and Typescript. So here I will write a short post indicating what I did to make it work,
Create a webworker
On App.tsx I added the
getWorker
method.When I did this a new webworker was added, but when I was trying to access to it using createWebworker it was not found. It was fixed after adding this to the
vite.config.ts
.After adding that. I was able to instantiate correctly the worker
I hope my comment could help you. Happy coding!
Beta Was this translation helpful? Give feedback.
All reactions