tanstack-cli --router-only project tanstack-query add on scaffolds a tanstack-start router.tsx

Offen
#522 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@tannerlinsley arbeitet bereits daran.

Seit 19.11.2026.

  • #584 von @tannerlinsley — offen

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
react, typescript
Bereich
cli

Rechercherichtung

Start by reproducing the report: create a React app with --router-only, then run add tanstack-query and check the generated files. The payload does not name the add-on source files, so find where the tanstack-query add-on writes router.tsx and where it inserts the provider. Done means the add-on no longer creates an unused router.tsx and the app root is wrapped in a query provider. The request to support --router-only on create is a separate question; confirm with maintainers before changing it.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Which project does this relate to?

Create Tanstack App

Describe the bug

Tanstack query add-on command adds a router.tsx file which is unused and doesn't wrap the app in a query provider like the previous cli tooling used to do.

Your Example Website or App

http://#

Steps to Reproduce the Bug or Issue

If you create a new app: I used this command:

pnpm dlx @tanstack/cli@latest create frontend \ 
  --router-only \
  --framework react \
  --package-manager pnpm \
  --toolchain eslint \
  --no-examples \
  --tailwind \
  --no-git \
  -y

I then added some add-ons as you can no longer add add-ons through the create interactive cli for router only

pnpm dlx @tanstack/cli@latest add \             
  shadcn \       
  t3env \            
  tanstack-query \        
  paraglide \         
  compiler 
Expected behavior

For the cli command to be able to accept router-only flag or for the router-only cli to enable add ons as part of start up

Screenshots or Videos

No response

Platform

MacOS

Additional context

No response

Vorherrschende Sprache
TypeScript
Sterne
1.3k
Forks
188
Ø Merge
5 Std. 30 Min.
Gemergte PRs (30 T.)
42

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TanStack/cli

Alle Issues in TanStack/cli

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.