Skip to content

fix(tanstackstart-react): Rewrite source paths of split route modules - #25361

Merged
s1gr1d merged 2 commits into
developfrom
sig/tanstack-start-rewrite-sources
Oct 14, 2026
Merged

s1gr1d merged 2 commits into
developfrom
sig/tanstack-start-rewrite-sources

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Oct 14, 2026

Copy link
Copy Markdown
Member

TanStack Start splits route files into virtual modules such as index.tsx?tss-serverfn-split. The uploaded source maps kept these queries, and their paths stayed relative to the map's directory, so frames did not show the source file.

The default rewriteSources hook now removes the split queries and makes paths relative to the project root, such as src/routes/index.tsx. A user's sourcemaps.rewriteSources still takes precedence.

First PR of a stack for #21012.

Refs #21012

TanStack Start splits route files into virtual modules such as `index.tsx?tss-serverfn-split`.
The uploaded source maps kept these queries and paths relative to the map's directory, so frames
did not show the path of the source file.

Remove the split queries and make source paths relative to the project root, so frames show paths
such as `src/routes/index.tsx`. A user's `sourcemaps.rewriteSources` still takes precedence.
@s1gr1d
s1gr1d marked this pull request as ready for review October 14, 2026 12:01
@s1gr1d
s1gr1d requested a review from a team as a code owner October 14, 2026 12:01
@s1gr1d
s1gr1d requested review from chargome, mydea and nicohrubec and removed request for a team October 14, 2026 12:01
@s1gr1d

s1gr1d commented Oct 14, 2026

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 27e85c7. Configure here.

Comment thread packages/tanstackstart-react/src/vite/sourceMaps.ts Outdated
Co-authored-by: Jan Peer Stöcklmair <jan.peer@sentry.io>
@s1gr1d
s1gr1d enabled auto-merge (squash) October 14, 2026 13:52
@s1gr1d
s1gr1d merged commit ca4c983 into develop Oct 14, 2026
289 checks passed
@s1gr1d
s1gr1d deleted the sig/tanstack-start-rewrite-sources branch October 14, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants