Skip to content

fix(tanstackstart-react): Unminify server errors in Nitro builds - #25360

Open
s1gr1d wants to merge 4 commits into
sig/tanstack-start-delete-source-mapsfrom
sig/tanstack-start-source-maps
Open

s1gr1d wants to merge 4 commits into
sig/tanstack-start-delete-source-mapsfrom
sig/tanstack-start-source-maps

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Server errors in TanStack Start stayed minified: Nitro's source maps were off, or stopped at its intermediate SSR bundle in node_modules/.nitro.

  • Loads the SSR source maps into Nitro's build, so the final maps point to src/.
  • Turns on 'hidden' Nitro source maps only if no config sets them, and always keeps sourcesContent (sourcemapMinify: false).
  • Deletes the Nitro source maps that Sentry turned on after the upload.

Nuxt 5 has the same Nitro issues: #25325 fixes sourcesContent, and the map composition can be reused there.

Based on #24356 by @kyrylolvov. Stacked on #25362.

Fixes #21012

Server errors in TanStack Start stayed minified. Sentry did not turn on Nitro's source
maps, and Nitro's maps stopped at its intermediate SSR bundle in `node_modules/.nitro`.

Load the SSR source maps into Nitro's build, so the final maps point to `src/`. Turn on
'hidden' Nitro source maps only if no Vite or Nitro config sets them, and always set
`sourcemapMinify: false` to keep `sourcesContent`. Delete the Nitro source maps that Sentry
turned on after the upload.

Fixes #21012
Co-Authored-By: kyrylolvov <kyrylolvov@icloud.com>
@s1gr1d
s1gr1d force-pushed the sig/tanstack-start-source-maps branch from a0e6667 to a58eeb9 Compare October 14, 2026 11:55
@s1gr1d
s1gr1d changed the base branch from develop to sig/tanstack-start-delete-source-maps October 14, 2026 11:56
@s1gr1d
s1gr1d marked this pull request as ready for review October 14, 2026 11:58
@s1gr1d
s1gr1d requested a review from a team as a code owner October 14, 2026 11:58
@s1gr1d
s1gr1d requested review from chargome and mydea and removed request for a team October 14, 2026 11:58
@s1gr1d
s1gr1d requested a review from nicohrubec October 14, 2026 12:01
Credit @kyrylolvov for #24356, which this fix is based on.
@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 38a674a. Configure here.

…layers

Sentry reads Nitro's config sources from the internal `_c12` option. Link the issue that asks
Nitro to expose them, so the code can move to the public option later.

This branch has not been deployed

No deployments
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.

tanstack-start: source maps support for server code

1 participant