Devtools with Vite+React
I am trying to use @tanstack/react-query-devtools with vite. It simply doesn't show up. There aren't any errors either, it's just not visible. Hit a wall debugging this, have already tried manually setting the NODE_ENV environment variable to
development (logging reflected the change) and tried embedded mode (other than the default of the floating mode),
Was hoping to see if other people have gone through similar issues maybe, so I could sort this out faster. Thanks.4 Replies
ratty-blush•3y ago
Hi 👋 please can you provide a reproduction?
eastern-cyanOP•3y ago
hi! I tried to create one on codesandbox, but it seems to work fine there
eastern-cyanOP•3y ago
Hi again, managed to reproduce it: https://codesandbox.io/p/sandbox/tanstack-query-devtools-bug-pc03z6
tanstack-query-devtools-bug
A reproduction for how tanstack query react devtools does not work with vite when the node-polyfill plugin is us
eastern-cyanOP•3y ago
the offender seems to be
nodePolyfills({}) vite plugin from the package "vite-plugin-node-polyfills"
removing that makes the devtools render