Skip to content

feat(nextjs): Unify reactComponentAnnotation across webpack and Turbopack - #23268

Open
chargome wants to merge 1 commit into
developfrom
charlygomez/unify-react-component-annotation
Open

feat(nextjs): Unify reactComponentAnnotation across webpack and Turbopack#23268
chargome wants to merge 1 commit into
developfrom
charlygomez/unify-react-component-annotation

Conversation

@chargome

@chargome chargome commented Aug 11, 2026

Copy link
Copy Markdown
Member

Unifies React component annotation into a single top-level reactComponentAnnotation for both webpack and Turbopack, mirroring applicationKey (#20794).

Removing the top-level option in #23221 was an oversight - it was deprecated back when annotation was webpack-only, but Turbopack supports it now.

webpack.reactComponentAnnotation and _experimental.turbopackReactComponentAnnotation are deprecated but still work, removal in v12. We only moved users onto the webpack one in 10.30.0, so removing it now would mean two migrations in a row.

Also warns when annotation is enabled on Turbopack + Next.js < 16, where it previously no-opped
silently.

…pack

Add a top-level `reactComponentAnnotation` option that applies to both webpack
and Turbopack builds, mirroring `applicationKey`. Both bundler paths already
call the same `createComponentNameAnnotateHooks`, so the split was historical.

Deprecate `webpack.reactComponentAnnotation` and
`_experimental.turbopackReactComponentAnnotation` without removing them, since
10.30.0 only recently moved users onto the webpack-scoped option. Bundler-scoped
options win over the top-level one, matching current behaviour.

Also warn when annotation is enabled on Turbopack with Next.js < 16, where it
previously no-opped silently.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chargome chargome self-assigned this Aug 11, 2026
@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 affa875. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 30.26 kB - -
@sentry/browser - with treeshaking flags 28.44 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.78 kB - -
@sentry/browser (incl. Tracing) 48.5 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.52 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.4 kB - -
@sentry/browser (incl. Tracing, Replay) 87.94 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.3 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 92.65 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 105.32 kB - -
@sentry/browser (incl. Feedback) 47.58 kB - -
@sentry/browser (incl. sendFeedback) 35.08 kB - -
@sentry/browser (incl. FeedbackAsync) 40.23 kB - -
@sentry/browser (incl. Metrics) 31.29 kB - -
@sentry/browser (incl. Logs) 31.55 kB - -
@sentry/browser (incl. Metrics & Logs) 32.24 kB - -
@sentry/react 32.06 kB - -
@sentry/react (incl. Tracing) 50.69 kB - -
@sentry/vue 35.32 kB - -
@sentry/vue (incl. Tracing) 50.45 kB - -
@sentry/svelte 30.28 kB - -
CDN Bundle 31.52 kB - -
CDN Bundle (incl. Tracing) 48.78 kB - -
CDN Bundle (incl. Logs, Metrics) 33.75 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 50.76 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.3 kB - -
CDN Bundle (incl. Tracing, Replay) 86.38 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 88.29 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 92.08 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 94.1 kB - -
CDN Bundle - uncompressed 93.59 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.5 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.06 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 152.36 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 228.98 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.75 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 271.6 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.45 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 285.28 kB - -
@sentry/nextjs (client) 53.24 kB - -
@sentry/sveltekit (client) 48.91 kB - -
@sentry/core/server 65.45 kB - -
@sentry/core/browser 51.79 kB - -
@sentry/node 117.89 kB -0.01% -1 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 82.05 kB -0.01% -2 B 🔽
@sentry/aws-serverless 91.42 kB - -
@sentry/cloudflare (withSentry) - minified 214.07 kB - -
@sentry/cloudflare (withSentry) 528.94 kB - -

View base workflow run

@chargome
chargome marked this pull request as ready for review August 11, 2026 09:51
@chargome
chargome requested a review from a team as a code owner August 11, 2026 09:51
@chargome
chargome requested review from logaretm, mydea, nicohrubec and s1gr1d and removed request for a team and s1gr1d August 11, 2026 09:51
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.

1 participant