T
TanStack17mo ago
mute-gold

Working on `router` though `tanstack.com`

This is more a tanstack.com question then router perhaps. Has anyone manage to work on the router packages with a local version of both router and tanstack.com? The setup I have is this:
tanstack/
|
+-- router/
|
+-- tanstack.com/
|
+-- ...other tanstack repos
tanstack/
|
+-- router/
|
+-- tanstack.com/
|
+-- ...other tanstack repos
Which is mentioned in the https://github.com/TanStack/tanstack.com?tab=readme-ov-file#editing-and-previewing-the-docs-of-tanstack-projects-locally for editing docs. I tried removing the underscore from the pnpm.overrides prop of the package.json of tanstack.com , which has file: links to .../router/react-router and so on and running pnpm run dev in both router and tanstack.com, but getting the changes in router to be reflected in tanstack.com doenstn't seem to work, and I'm now staring at hard vs soft link descriptions and having my brain melt. For context, I'm doing all this to see if I can track down this bug (Github issue at https://github.com/TanStack/tanstack.com/issues/218) where you can't actually switch docs versions or frameworks on the live query docs at https://tanstack.com/query/latest/docs/ right now.
GitHub
Issues · TanStack/tanstack.com
The marketing and docs site for all TanStack projects - Issues · TanStack/tanstack.com
Overview | TanStack Query React Docs
TanStack Query (FKA React Query) is often described as the missing data-fetching library for web applications, but in more technical terms, it makes fetching, caching, synchronizing and updating server state in your web applications a breeze. Motivation
GitHub
GitHub - TanStack/tanstack.com: The marketing and docs site for all...
The marketing and docs site for all TanStack projects - TanStack/tanstack.com
4 Replies
rising-crimson
rising-crimson17mo ago
Yup it works. Its not related to the pnpm overrides. You just need the folders to be named after the project.
tanstack/
router/
query/
table/
tanstack.com/
tanstack/
router/
query/
table/
tanstack.com/
mute-gold
mute-goldOP17mo ago
So if you make edits to the code (not the docs) in router/packages/react-router, those's changes will be reflected if your running dev in tanstack.com?
sensitive-blue
sensitive-blue17mo ago
It also helps to uncomment the _pnpm overrides in package.json and run pnpm i --force This will reinstall using local overrides Just don't commit that override or any lockfile changes without first going back to _pnpm to turn off the overrides and redo the lockfile
mute-gold
mute-goldOP17mo ago
I tried that but you have to do the force install everytime you change something in router (on macOS 14 anyhow). I got it somehow working with pnpm link'ing everying thing in that overrides field, so changes in router under pnpm dev are reflected on the site, but it still feels very fragile. I've managed to isolate the issue into it's own stackblitz and pr with tests directly onto router. thanks to @Sean Cassiere for the help.

Did you find this page helpful?