Skip to content
Source
Sign inSign up
TanStack/router

`routeTree.gen.ts` is not updated after deleting a route file when using rsbuild #4445

Send to my agent
ClosedYiCChi(GitHub profile, opens in a new tab) opened this issue 0 comments

Which project does this relate to?

Router

Describe the bug

With @tanstack/router-plugin@1.121.21, after deleting a route file, routeTree.gen.ts was not updated and got the following error.

File: ~/dev/repos/rsdoctor_tanstack-router/src/routeTree.gen.ts:1:1
  × Module not found: Can't resolve './routes/bar' in '~/dev/repos/rsdoctor_tanstack-router/src'
   ╭─[7:40]
 5 │ // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
 6 │ import { Route as rootRouteImport } from './routes/__root';
 7 │ import { Route as BarRouteImport } from './routes/bar';
   ·                                         ──────────────
 8 │ import { Route as AboutRouteImport } from './routes/about';
 9 │ import { Route as IndexRouteImport } from './routes/index';
   ╰────

 @ ./src/App.tsx
 @ ./src/index.tsx

btw, it works well on 1.120.15

Your Example Website or App

https://github.com/YiCChi/rsdoctor_tanstack-router

Steps to Reproduce the Bug or Issue

  1. pnpm dev
  2. delete a existing route file

Expected behavior

routeTree.gen.ts is correctly updated when deleting a route file

Screenshots or Videos

No response

Platform

OS: macOS 15.5 CPU: (10) arm64 Apple M2 Pro Memory: 74.91 MB / 32.00 GB Shell: 5.9 - /bin/zsh Browsers: Chrome: 137.0.7151.104 Safari: 18.5

Additional context

No response

Sign in to join this conversation.