I've a NuxtJS application and I'm trying to share a websocket connection throught the open tabs. Researching for this, I have found a way using shared-workers but I dont found this at Nuxt / Nuxt PWA documentation. I only found way to create custom workers in Nuxt PWA module with workbox.
Asked
Active
Viewed 291 times
2
-
https://github.com/Kong/swrv – Aifos Si Prahs Oct 19 '22 at 17:46
-
Does it help you in any way? I'll do more research on this specifically regarding PWA – Aifos Si Prahs Oct 19 '22 at 17:48
-
1@AifosSiPrahs I'll read and study this to see if its applies, I'll return here for updates, thank you. – Bruno Cardoso Oct 19 '22 at 17:55
-
OK, great, I'll do the research myself meanwhile – Aifos Si Prahs Oct 19 '22 at 18:10
-
1Hey @AifosSiPrahs, I've been solved this "issue" using a Worker-Loader. I'll anwser the question with more details. – Bruno Cardoso Nov 03 '22 at 04:33
1 Answers
4
I've been solved this problem using a Worker-Loader in my project. With this, I can configure worker files, incluse type of worker (sharedworker in this case) and import like a javascript module inside my component file.
This helps me how to configure: Using webpack worker-loader with nuxt.js

Bruno Cardoso
- 126
- 7