T
TanStack4w ago
equal-aqua

Dev server hot reload removes Electric API route (TanStack Start)

I have a very odd (and very minor) issue that I repeatedly run into. My workflow (using jj-vcs) involves me doing a lot of rebases or other changes to the git log. Very often I find that when I am running the vite dev server while performing these rebase operations, the automatic route tree generated by TanStack Start/Router (I believe - routeTree.gen.ts) will remove exactly one route from my route tree, until I restart the dev server, at which point it regenerates it back in and the file is once again unchanged. That route is consistently the one at const ApiElectricRouteImport = createFileRoute('/api/electric')() I have a maybe slightly complicated route structure in there, which is the only thing I can think of that might be causing it. I'm trying to take advantage of pathless routes here:
> tree src/routes/api/electric
src/routes/api/electric
└── _session
├── activities.ts
├── admin
│ └── _admin
│ ├── messages.ts
│ ├── route.ts
│ ├── trips.ts
│ └── users.ts
├── days.ts
├── message-attachments.ts
├── message-deltas.ts
├── messages.ts
├── route.ts
├── segments.ts
└── trips.ts

4 directories, 12 files
> tree src/routes/api/electric
src/routes/api/electric
└── _session
├── activities.ts
├── admin
│ └── _admin
│ ├── messages.ts
│ ├── route.ts
│ ├── trips.ts
│ └── users.ts
├── days.ts
├── message-attachments.ts
├── message-deltas.ts
├── messages.ts
├── route.ts
├── segments.ts
└── trips.ts

4 directories, 12 files
This might not be the right place for this question but I thought I'd start here since it really is only that specific route consistently, despite none of the rebased commits touching it.
1 Reply
quickest-silver
quickest-silver4w ago
Hmm yeah not sure, best to check with the start channel

Did you find this page helpful?