You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7070bd6
Browse filesBrowse the repository at this point in the historyBrowse files
perf(bundler-plugins): Use fast component annotation for HTML injection mode (#24440)
Stacked on #24437.
When `reactComponentAnnotation._experimentalInjectIntoHtml` was set,
annotation always went through Babel, even on Vite 8. This PR ports that
mode to the fast walker, so every Rollup and Vite build now uses the
fast path. The next step moves Webpack and the Next.js Turbopack loader
over, and after that Babel can be removed.
HTML mode finds components the same way as the normal mode. The
difference is in how it handles JSX. It adds only
`data-sentry-component`, and only to the first HTML elements below each
component root, looking through fragments and component elements to find
them. The port keeps two Babel quirks so the output stays the same:
element names starting with `_` or `$` count as HTML elements, and
anonymous classes get `data-sentry-component=""`.
The new tests compare the walker with the Babel HTML plugin on both
`@babel/parser` and `oxc-parser` output.
Ref #24415
0 commit comments