Commit 4bbb2ed
fix(bundler-plugins): Preserve full file path in component annotation source maps (#23572)
With `reactComponentAnnotation` enabled, the Babel transform emitted
source maps without `sourceFileName`, so Babel defaulted each map's
`sources` to the bare basename and every annotated `.jsx`/`.tsx` file
lost its directory in the final `.js.map`. Passing `sourceFileName`
alongside `filename` restores the full path, matching how non-annotated
files and the vite annotation path already behave.
Fixes #23561
Co-authored-by: Ryan Rho <272582209+ryanrho-mercor@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 936541e commit 4bbb2ed
2 files changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
5 | 19 | | |
6 | 20 | | |
7 | 21 | | |
| |||
0 commit comments