-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
@nyoung697 Were you able to get shopify web worker react working with remix? Curious if there is any sample code. That interface looks super nice to work with. |
Beta Was this translation helpful? Give feedback.
-
Thanks Sergio! What do you think of doing something like this? Add this script to package.json:
Then just put all the worker files in the I tested it out in my project, and it allows me to import other libraries into my worker (like webworker-promise). I'm not that well versed in build tools though, so I might be overlooking something. |
Beta Was this translation helpful? Give feedback.
-
Yes, create a Remember to only use the WebWorker client-side, so it must happen in |
Beta Was this translation helpful? Give feedback.
Yes, create a
.js
file inside the public folder and follow https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers to load itRemember to only use the WebWorker client-side, so it must happen in
entry.client
, insideuseEffect
or inside an event handler.