feat(nextjs): Unify reactComponentAnnotation across webpack and Turbopack - #23268
Open
chargome wants to merge 1 commit into
Open
feat(nextjs): Unify reactComponentAnnotation across webpack and Turbopack#23268chargome wants to merge 1 commit into
chargome wants to merge 1 commit into
Conversation
…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>
Member
Author
|
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 affa875. Configure here.
Contributor
size-limit report 📦
|
chargome
marked this pull request as ready for review
August 11, 2026 09:51
chargome
requested review from
logaretm,
mydea,
nicohrubec and
s1gr1d
and removed request for
a team and
s1gr1d
August 11, 2026 09:51
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.
Unifies React component annotation into a single top-level
reactComponentAnnotationfor both webpack and Turbopack, mirroringapplicationKey(#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.reactComponentAnnotationand_experimental.turbopackReactComponentAnnotationare 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.