Skip to content

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

Description

@TheAlexLichter

Steps to Reproduce

  1. Create a Vite + React project and add a good amount of JSX components
  2. Build the project. This is fast
  3. Enable reactComponentAnnotation
  4. Build again - now it is slow :(

Actual Result

When using the option in Sentry's Vite plugin, a Babel transform is utilized which slows down builds with a lot of components.

const transformAnnotations = options.reactComponentAnnotation?.enabled

Expected Result

A Rolldown/Vite 8 parse + Magic String transform is used which should take a fraction of the time.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    Status
    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions