fix: stop Sentry double debug IDs breaking client source maps - #1095
Merged
Conversation
Passing sourcemaps through unstable_sentryVitePluginOptions overwrites sourcemaps.disable: true in @sentry/react-router, so each client chunk gets two debug IDs and Sentry symbolicates against the one without a map. Move release to the supported top-level options, drop the unstable sourcemaps override (sentryOnBuildEnd already deletes maps), and use hidden source maps so public assets do not advertise map URLs. Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1094.
Passing
sourcemapsthroughunstable_sentryVitePluginOptionsoverwrites@sentry/react-router's intentionalsourcemaps.disable: true. That re-enables Vite-plugin debug ID injection on top ofsentryOnBuildEnd, so every client chunk ships two debug IDs — and the one that wins at runtime has no uploaded map (js_no_source). Upstream: getsentry/sentry-javascript#22929.Changes
release(name+setCommits) to the supported top-levelSentryReactRouterBuildOptionsfieldsunstable_sentryVitePluginOptionsentirely —sentryOnBuildEndalready deletes maps via`${buildDirectory}/**/*.map`build.sourcemap: 'hidden'so maps are still emitted for upload without a publicsourceMappingURLcommentTest plan
vite.config.tstypechecks with the top-levelreleaseshapeSENTRY_AUTH_TOKENset: each client chunk should contain a single debug ID//# sourceMappingURL=comment