T
TanStack3y ago
foreign-sapphire

how to implement dev tools for vue query

I installed the @tanstack/vue-query and making requests normally however I’m wondering how can I implement it in the dev tools, I already have the vue plugin for dev tools. Also a weird thing happening is that when I connect to a localhost api the query is there in the tools , but if it’s a remote api it doesn’t show.
3 Replies
wee-brown
wee-brown3y ago
I'm not entirely sure what could be an issue. It should not matter what endpoint is called as long as queryFn returns a promise that resolves returning data. Devtools are also treeshaken from production builds. So you won't be able to use it if you build your app for production, which is not overidable right now. Maybe you can provide a minimal reproduction repository?
foreign-sapphire
foreign-sapphireOP3y ago
I’m using it in dev mode not production, I can provide some screenshots on the setup if you want but a repo I don’t think I can, it’s a private one for work I just tested it again with local host it shows and with another api it says in the dev tools “Inspector vue-query not found” I’m importing everything from “@tanstack/vue-query” so I installed vue query regular one 1.26.0 and replaced 2 imports, 1 for vue query plugin and other for the options one, and it is visible again on remote and local replaced them back to tanstack and it stayed working, really is a mystery haha anyway things got resolved
wee-brown
wee-brown3y ago
In case of nuxt or vite setups, it might be caused by the cache they are creating. Try clearing their cache and maybe doing clean install by removing node_modules and lock file. Then see if the issue is still happening.

Did you find this page helpful?