Skip to content

feat(react-router)!: Remove unstable_sentryVitePluginOptions - #23374

Merged
chargome merged 1 commit into
charlygomez/js-3359-nextjs-remove-unstable_sentrywebpackpluginoptionsfrom
charlygomez/js-3360-react-router-remove-unstable_sentryvitepluginoptions
Aug 13, 2026
Merged

feat(react-router)!: Remove unstable_sentryVitePluginOptions#23374
chargome merged 1 commit into
charlygomez/js-3359-nextjs-remove-unstable_sentrywebpackpluginoptionsfrom
charlygomez/js-3360-react-router-remove-unstable_sentryvitepluginoptions

Conversation

@chargome

@chargome chargome commented Aug 12, 2026

Copy link
Copy Markdown
Member

Removes unstable_sentryVitePluginOptions from the React Router build options.

Net deletion of ~430 lines: the hatch could contradict sentryOnBuildEnd, so a guard, a console.warn and an "explicit undefined erases the unstable value" workaround all existed purely to contain it. All three go.

While removing it, sentryUrl and headers turned out to reach the SentryCli constructor only through the hatch, so self-hosted setups had no supported way to point the buildEnd upload at their instance. They are now read from the top-level config — the react-router-sourcemaps e2e app depended on exactly this, via unstable_sentryVitePluginOptions.url.

Tests asserting hatch-vs-top-level precedence are deleted; the ones asserting real invariants (source maps stay disabled for the Vite plugin, filesToDeleteAfterUpload never forwarded, metaFramework pinned) are rewritten against top-level options. The #22929 regression coverage is preserved in both the unit tests and the e2e app.

Fixes #23344

@linear-code

linear-code Bot commented Aug 12, 2026

Copy link
Copy Markdown

JS-3360

@chargome chargome self-assigned this Aug 12, 2026
@chargome
chargome force-pushed the charlygomez/js-3360-react-router-remove-unstable_sentryvitepluginoptions branch from aa5d1e9 to 2200de9 Compare August 13, 2026 09:28
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 30.3 kB - -
@sentry/browser - with treeshaking flags 28.47 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.81 kB - -
@sentry/browser (incl. Tracing) 48.54 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.55 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.43 kB - -
@sentry/browser (incl. Tracing, Replay) 87.94 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.32 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 92.67 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 105.36 kB - -
@sentry/browser (incl. Feedback) 47.65 kB - -
@sentry/browser (incl. sendFeedback) 35.13 kB - -
@sentry/browser (incl. FeedbackAsync) 40.28 kB - -
@sentry/browser (incl. Metrics) 31.24 kB - -
@sentry/browser (incl. Logs) 31.52 kB - -
@sentry/browser (incl. Metrics & Logs) 32.15 kB - -
@sentry/react 32.09 kB - -
@sentry/react (incl. Tracing) 50.73 kB - -
@sentry/vue 35.31 kB - -
@sentry/vue (incl. Tracing) 50.5 kB - -
@sentry/svelte 30.33 kB - -
CDN Bundle 31.61 kB - -
CDN Bundle (incl. Tracing) 48.87 kB - -
CDN Bundle (incl. Logs, Metrics) 33.8 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 50.79 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.31 kB - -
CDN Bundle (incl. Tracing, Replay) 86.46 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.29 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 92.16 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.11 kB - -
CDN Bundle - uncompressed 93.84 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.72 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.14 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.41 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.08 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.98 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 271.65 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.68 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 285.34 kB - -
@sentry/nextjs (client) 53.26 kB - -
@sentry/sveltekit (client) 48.96 kB - -
@sentry/core/server 65.34 kB - -
@sentry/core/browser 51.69 kB - -
@sentry/node 117.67 kB +0.01% +1 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 82.06 kB - -
@sentry/aws-serverless 91.47 kB - -
@sentry/cloudflare (withSentry) - minified 213.99 kB - -
@sentry/cloudflare (withSentry) 528.78 kB - -

View base workflow run

@chargome
chargome force-pushed the charlygomez/js-3360-react-router-remove-unstable_sentryvitepluginoptions branch from 2200de9 to 9fbbb98 Compare August 13, 2026 09:44
@chargome

Copy link
Copy Markdown
Member Author

bugbot run

Comment thread packages/react-router/src/vite/makeCustomSentryVitePlugins.ts
@chargome
chargome force-pushed the charlygomez/js-3360-react-router-remove-unstable_sentryvitepluginoptions branch from 9fbbb98 to e467eb0 Compare August 13, 2026 10:02
@chargome
chargome force-pushed the charlygomez/js-3360-react-router-remove-unstable_sentryvitepluginoptions branch from e467eb0 to 57a4e9d Compare August 13, 2026 10:56
@chargome
chargome force-pushed the charlygomez/js-3360-react-router-remove-unstable_sentryvitepluginoptions branch from 57a4e9d to fe86f1a Compare August 13, 2026 11:45
@chargome
chargome force-pushed the charlygomez/js-3360-react-router-remove-unstable_sentryvitepluginoptions branch from fe86f1a to 4cc6f3a Compare August 13, 2026 12:26
@chargome
chargome force-pushed the charlygomez/js-3360-react-router-remove-unstable_sentryvitepluginoptions branch 2 times, most recently from ef17260 to 488405f Compare August 13, 2026 12:48
@chargome

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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 488405f. Configure here.

// same handling as in bundler plugins: https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/05084f214c763a05137d863ff5a05ef38254f68d/packages/bundler-plugin-core/src/build-plugin-manager.ts#L102-L103
project: Array.isArray(project) ? project[0] : project,
project,
url: sentryUrl,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Silent option skipped for CLI upload

Medium Severity

Top-level silent is passed through to the Vite plugin but not to the SentryCli instance that injects debug IDs and uploads source maps. After the hatch was removed, that flag no longer reaches the CLI, so upload-path logs keep printing even when silent is set.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 488405f. Configure here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chargome
chargome force-pushed the charlygomez/js-3360-react-router-remove-unstable_sentryvitepluginoptions branch from 488405f to 3f1ce8b Compare August 13, 2026 13:17
@chargome
chargome marked this pull request as ready for review August 13, 2026 13:45
@chargome
chargome requested a review from a team as a code owner August 13, 2026 13:45
@chargome
chargome requested review from mydea and s1gr1d and removed request for a team August 13, 2026 13:45

@s1gr1d s1gr1d left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, but there are some comments about self-hosted which seem more like part of a debugging-observation than a prominent comment we need to point out (but treat this as L, this can still be merged)

Comment on lines +49 to +50
// `url` and `headers` previously only reached the CLI through `unstable_sentryVitePluginOptions`,
// so self-hosted setups had no supported way to point this upload at their instance.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

not sure if this comment is needed here - without looking at this PR, this feels a bit out of place

@chargome
chargome merged commit bb2d0ee into develop Aug 13, 2026
387 of 390 checks passed
@chargome
chargome deleted the charlygomez/js-3360-react-router-remove-unstable_sentryvitepluginoptions branch August 13, 2026 15:24
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.

react-router: Remove unstable_sentryVitePluginOptions

2 participants