Skip to content

perf(vite): add fast component annotation transform#944

Closed
TheAlexLichter wants to merge 1 commit into
getsentry:mainfrom
TheAlexLichter:perf/vite-8-parse-transform
Closed

perf(vite): add fast component annotation transform#944
TheAlexLichter wants to merge 1 commit into
getsentry:mainfrom
TheAlexLichter:perf/vite-8-parse-transform

Conversation

@TheAlexLichter

@TheAlexLichter TheAlexLichter commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Resolves #943

This PR adds a port of the Babel transform forreactComponentAnnotation.enabled that works with Vite 8 + magic string, dramatically decreasing build time.

I've also added parity tests and consolidated values to avoid drift of both implementations.

Vite 7 and fallback cases will use the existing Babel transform.
Both Babel and the Vite annotation backend are lazy-loaded to avoid unnecessary startup cost.

@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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2e19e63. Configure here.

Comment thread packages/bundler-plugins/src/rollup/index.ts Outdated
@TheAlexLichter
TheAlexLichter force-pushed the perf/vite-8-parse-transform branch from 2e19e63 to 0fd7570 Compare June 27, 2026 14:42
@timfish

timfish commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Closing in favour of this PR in the JavaScript repository.

Apologies for leaving this ambiguity lying around in this repo!

@timfish timfish closed this Jul 8, 2026
@TheAlexLichter
TheAlexLichter deleted the perf/vite-8-parse-transform branch July 8, 2026 12:56
Lms24 pushed a commit to getsentry/sentry-javascript that referenced this pull request Jul 9, 2026
Credit to @TheAlexLichter who opened [this
PR](getsentry/sentry-javascript-bundler-plugins#944)
against the bundler plugins repo after we moved the functionality to
this repo but before we managed to remove the orphaned package!

> Resolves
getsentry/sentry-javascript-bundler-plugins#943
>
> This PR adds a port of the Babel transform
`forreactComponentAnnotation.enabled` that works with Vite 8 + magic
string, dramatically decreasing build time.
>
> I've also added parity tests and consolidated values to avoid drift of
both implementations.
>
> Vite 7 and fallback cases will use the existing Babel transform.
> Both Babel and the Vite annotation backend are lazy-loaded to avoid
unnecessary startup cost.
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.

Vite 8 /Rolldown: Do not use Babel for annotating react components

2 participants