Running Vue app in a WebWorker #2081
Unanswered
person1123
asked this question in
Q&A
Replies: 1 comment
-
This would be super useful! I have the same problem |
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
-
The app that I'm working on uses a Vue app that runs in a WebWorker using a custom renderer, in addition to a Vue app in the main process using the default renderer. The devtools only show the app in the main process, since the
__VUE_DEBUG_GLOBAL_HOOK__
is only set on thewindow
, not on the webworker's global context. I'm trying to figure out how to get the devtools to show the custom renderer components as well.My first idea was to build a plugin using the API that adds a panel for the custom rendered components. This seems like it will work, but I would have to reimplement a lot of the logic in the backend to traverse the Vue tree and create nodes that the devtools can display. Ideally I'd be able to import this code and use it directly, but the backend packages are not available on npm.
Rather than redoing all that work, it also seems like it ought to be possible based on the architecture diagram here to register a second backend on the webworker that hooks into the same chrome plugin.
Does anyone have any suggestions as to how to do this? Or if this is something that others would find useful I would be happy to work on a PR to make this functionality part of the plugin directly if anyone has any ideas on how to do so.
Beta Was this translation helpful? Give feedback.
All reactions