Repository navigation
Conversation
…ource maps The component annotation transform returned a magic-string map without names. SWC, which Next.js runs after the annotation loader with webpack and Turbopack, takes names only from the input map when it composes maps, so annotated files lost every name and stack frames showed minified function names. Add the names of identifiers to the map segments that start at them. Fixes #26939 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
bugbot run |
Contributor
size-limit report 📦Compared: 2f8ae17 (PR test merge using develop at d799281) Against: d799281 (develop) · base run #68208 ✅ Baseline matches: this diff contains only this PR's changes.
|
Contributor
Optional E2E testsAll optional checks were successful. 56 successful. See the run. Successful checks
|
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 28f8146. Configure here.
chargome
marked this pull request as ready for review
November 27, 2026 14:38
javascript-sdk-gitflow
Bot
requested review from
nicohrubec,
s1gr1d and
timfish
November 27, 2026 14:38
chargome
requested review from
JPeer264
and removed request for
nicohrubec and
s1gr1d
November 27, 2026 14:38
timfish
approved these changes
Nov 28, 2026
This branch has not been deployed
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.
What
With
reactComponentAnnotationenabled, annotated files keep their function names in the final source maps again. Before, stack frames from these files showed minified names, and an error could split into a new issue on each release.Why
The annotation loader returned a source map without
names. SWC runs after the loader with both webpack and Turbopack, and when it composes maps it takes names only from the input map, so every name was lost. The transform now adds the names of identifiers to its map, using the AST it already parses. I checked this with anext build --turbopackon Next 16.4.6, where the function declarations map to their original names again.Closes: #26939