query icon indicating copy to clipboard operation
query copied to clipboard

When used in conjunction with the latest version of "[email protected]," there may be an error.

Open whyfail opened this issue 2 years ago • 2 comments

Describe the bug

In a Vite project, when using both "@tanstack/vue-query": "^5.17.0" and "vite-plugin-vue-devtools": "^7.0.3" simultaneously, there may be an error upon starting the project.

This results in my "vite-plugin-vue-devtools" being unable to function properly.

Your minimal, reproducible example

https://codesandbox.io/p/devbox/tanstack-vue-query-7d2xj6

Steps to reproduce

Open the console and you'll see an error message

image

Expected behavior

Open the console and you'll see an error message

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

window11 Google Chrome:119.0.6045.159 vue:3.4.3 vite:5.0.10

Tanstack Query adapter

None

TanStack Query version

v5.17.0

TypeScript version

No response

Additional context

No response

whyfail avatar Jan 03 '24 10:01 whyfail

@DamianOsipiuk fyi

TkDodo avatar Jan 28 '24 20:01 TkDodo

@whyfail Since this is a breaking change in the devtools rewrite, we cannot do to much from our side actually.
What we could do is to offer a way to disable the devtools plugin. Or maybe even disable it by default, and offer enable flag? 🤔

And for the future, since now there are a lot of devtools creating (nuxt, vite, vue) i think that we should eventually remove it from the lib itself.
It was ok, when there was only one official vue devtools, but now people can choose from many.

We offer component-based devtools that should be always up-to-date, and if someone wants to hook to other offered by their framework, it should be up to the community to maintain those integrations.

DamianOsipiuk avatar Jan 29 '24 15:01 DamianOsipiuk

So, how to enable the devtools if I want to use it. In the documentary, there are no hints on how to do it: https://tanstack.com/query/v4/docs/framework/vue/devtools

StefanFlaschko avatar Apr 19 '24 13:04 StefanFlaschko