Skip to content

feat(nextjs)!: Remove unstable_sentryWebpackPluginOptions - #23372

Merged
chargome merged 1 commit into
charlygomez/js-3358-astro-remove-unstable_sentryvitepluginoptionsfrom
charlygomez/js-3359-nextjs-remove-unstable_sentrywebpackpluginoptions
Aug 13, 2026
Merged

feat(nextjs)!: Remove unstable_sentryWebpackPluginOptions#23372
chargome merged 1 commit into
charlygomez/js-3358-astro-remove-unstable_sentryvitepluginoptionsfrom
charlygomez/js-3359-nextjs-remove-unstable_sentrywebpackpluginoptions

Conversation

@chargome

@chargome chargome commented Aug 12, 2026

Copy link
Copy Markdown
Member

Removes unstable_sentryWebpackPluginOptions — both the deprecated top-level option and the one nested under webpack.

SentryBuildOptions is hand-rolled rather than built on BuildTimeOptionsBase, so it was missing moduleMetadata and sourcemaps.resolveSourceMap. Both were only reachable through the hatch and are added here, reusing the shared types from core. webpack.reactComponentAnnotation now uses the shared ReactComponentAnnotationOptions too.

Adds a build-time warning covering both spellings. This matters most for Next.js: next.config.js / next.config.mjs get no type checking, so a removed option would otherwise be a silent no-op.

Fixes #23343

@chargome chargome self-assigned this Aug 12, 2026
@linear-code

linear-code Bot commented Aug 12, 2026

Copy link
Copy Markdown

JS-3359

@chargome
chargome force-pushed the charlygomez/js-3359-nextjs-remove-unstable_sentrywebpackpluginoptions branch from 675f2aa to ab9b3a7 Compare August 12, 2026 14:51
@chargome
chargome changed the base branch from charlygomez/js-3355-core-add-build-time-options-for-bundler-plugin-parity to charlygomez/js-3358-astro-remove-unstable_sentryvitepluginoptions August 12, 2026 14:51
@github-actions

github-actions Bot commented Aug 12, 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 - -
@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-3359-nextjs-remove-unstable_sentrywebpackpluginoptions branch from ab9b3a7 to c1770ab Compare August 13, 2026 09:28
@chargome
chargome force-pushed the charlygomez/js-3359-nextjs-remove-unstable_sentrywebpackpluginoptions branch from c1770ab to c588280 Compare August 13, 2026 09:44
@chargome

Copy link
Copy Markdown
Member Author

bugbot run

Comment thread packages/nextjs/src/config/types.ts
Comment thread packages/nextjs/test/config/withSentryConfig.test.ts
@chargome
chargome force-pushed the charlygomez/js-3359-nextjs-remove-unstable_sentrywebpackpluginoptions branch from c588280 to 16026d6 Compare August 13, 2026 10:02
@chargome
chargome force-pushed the charlygomez/js-3359-nextjs-remove-unstable_sentrywebpackpluginoptions branch from 16026d6 to f6f7e93 Compare August 13, 2026 10:56
@chargome
chargome force-pushed the charlygomez/js-3359-nextjs-remove-unstable_sentrywebpackpluginoptions branch from f6f7e93 to 3601edd Compare August 13, 2026 11:45
@chargome
chargome force-pushed the charlygomez/js-3359-nextjs-remove-unstable_sentrywebpackpluginoptions branch 2 times, most recently from e2b52f4 to e59a26a Compare August 13, 2026 12:32
@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.

✅ 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 e59a26a. Configure here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chargome
chargome force-pushed the charlygomez/js-3359-nextjs-remove-unstable_sentrywebpackpluginoptions branch 2 times, most recently from e59a26a to 7418e02 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 removed the request for review from a team August 13, 2026 13:45
* something other than a relative path, Sentry is unable to locate the source map for a given
* build artifact. This hook lets you implement the resolution process yourself.
*/
resolveSourceMap?: ResolveSourceMapHook;

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.

q: why do we have this new option now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this was not hoisted before, we'll move nextjs to the shared type

* the SDK warns at build time. For `thirdPartyErrorFilterIntegration` support use
* `applicationKey`, which works on both bundlers.
*/
moduleMetadata?: ModuleMetadata | ModuleMetadataCallback;

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.

q: same for this one

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

same for this, we only have applicationKey, which calls this behind the scenes but we'll make it available top level

@chargome
chargome merged commit f8138e0 into develop Aug 13, 2026
201 checks passed
@chargome
chargome deleted the charlygomez/js-3359-nextjs-remove-unstable_sentrywebpackpluginoptions 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.

nextjs: Remove unstable_sentryWebpackPluginOptions

3 participants