Uh oh!
There was an error while loading. Please reload this page.
fix(react-router): Preserve sourcemaps.disable when unstable_sentryVitePluginOptions is set - #22945
Conversation
chargome
commented
Aug 3, 2026
bugbot run |
Uh oh!
There was an error while loading. Please reload this page.
size-limit report 📦
|
chargome
commented
Aug 3, 2026
bugbot run |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…ugin The bundler plugin deletes these files in a `finally` block in `writeBundle` that runs regardless of `sourcemaps.disable`, so forwarding the option removed the maps before `sentryOnBuildEnd` could inject debug IDs and upload them - the same end symptom as the double-injection bug, reached from the other side. Deletion still happens in `sentryOnBuildEnd`, driven by the same user option. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
chargome
commented
Aug 3, 2026
bugbot run |
There was a problem hiding this comment.
✅ 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 1d90d5b. Configure here.
| expect(mockSentryCliInstance.releases.uploadSourceMaps).not.toHaveBeenCalled(); | ||
| }); | ||
| it('should let top-level sourcemaps.disable override unstable_sentryVitePluginOptions', async () => { |
There was a problem hiding this comment.
hmm didn't we say that unstable options always have precedence? Tbh this is logaf-super-L for me since we can remove unstable options with v11 but was curious on your thoughts either way
There was a problem hiding this comment.
Maybe I misremembered and it's the other way around
There was a problem hiding this comment.
Was pre-existing, I'll streamline in a follow up
Uh oh!
There was an error while loading. Please reload this page.
…entryVitePluginOptions` is set (#22966) Backport of: #22945 Also flips `sourcemaps.disable` precedence in `sentryOnBuildEnd` so `unstable_sentryVitePluginOptions` wins. This is not part of #22945 as the unstable options will likely disappear there anyway. --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…rce map upload (#22956) This adds a build-time assertion app modelled on `nextjs-sourcemaps`, for react router. It asserts three things about the real build output: - exactly one debug ID per client chunk - source maps with non-empty mappings present in the uploaded artifact bundles - every shipped debug ID backed by an upload. ref #22945 --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
A trailing
...unstable_sentryVitePluginOptionsspread sat aftersourcemaps: { disable: true }, and object spread replaces whole keys rather than deep-merging — so any user-suppliedsourcemapsobject droppeddisable. The Vite plugin then injected a second debug ID on top of the one fromsentryOnBuildEnd.The spread now sits between the plain options and the field-wise merged objects: it can still
override flat keys (its documented contract) but can't replace
sourcemaps,release,_metaOptionsorreactComponentAnnotation.supersedes #22930 — credit to @okxint for the same diagnosis.
closes#22929