Replies: 3 comments
-
|
Hi @tkalmar, Good catch. You’re right that relying on a jsdom-specific user-agent check is quite fragile and environment-dependent. Disabling devtools based on A possible middle ground could be:
This would make the behavior more predictable and less coupled to a specific DOM implementation. If this addresses your concern, please mark this as answered. If not, let me know what part you’d like to dig into further. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the feedaback! |
Beta Was this translation helpful? Give feedback.
-
|
Hi @tkalmar! Working with Vue reactivity system and compilers can sometimes present interesting edge cases. A few quick things to consider regarding this topic:
I highly recommend checking out the Vue DevTools extension to inspect the component tree and verify if the state is updating as expected. Let me know if you want to dig deeper into the specific component logic. Hope this points you in the right direction! Let me know how it goes. Happy coding! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
i recently stumbled upon
https://github.com/vuejs/core/blame/623bfb29a23c36bf935e7faefa64d1baa69d465c/packages/runtime-core/src/devtools.ts#L67
after switching my vitest environment from jsdom to happy-dom.
Wouldn't it be better if devtools get disabled if NODE_ENV=== 'test'? Only testing for jsdom there is very specific and what happens if jsdom replaces the user-agent? or someone mocks the user-agent with ohter strings? I personally find this very fragile.
Beta Was this translation helpful? Give feedback.
All reactions