Skip to content
Source
Sign inSign up
TanStack/query

Devtools not being excluded in production (v5/alpha) #5680

Send to my agent
Closedkaumac(GitHub profile, opens in a new tab) opened this issue 1 comment

Describe the bug

I'm using the alpha (v5) version of tanstack query on a side project and I have added the devtools. The dependency ("@tanstack/react-query-devtools": "^5.0.0-alpha.72",) is installed as a dev dependency (also tried as normal dependency). I'm using it on a NextJS v13 app generated with created-next-app. The app is being deployed to Vercel.

The same setup but using react-query v4 was working and deploying to production without a problem.

Your minimal, reproducible example

https://github.com/kaumac/rank-tt

Steps to reproduce

Running npm run build should trigger the error

Expected behavior

As a user, I expect to not have the devtools as part of the production bundle, but its happening and breaking production builds.

How often does this bug happen?

Every time

Screenshots or Videos

Captura de Tela 2023-07-06 às 03 04 30

Platform

Mac OS 12.6

Tanstack Query adapter

react-query

TanStack Query version

5.0.0-alpha.72

TypeScript version

5.1.5

Additional context

No response

  1. lachlancollins(GitHub profile, opens in a new tab) added labelspackage: react-query-devtools

  2. seems to be the same error as in this issue:

    so let's track it there

  3. TkDodo closed this

  4. TkDodo added labelsduplicate

  5. TkDodo added labelsv5

Sign in to join this conversation.