Repository navigation
feat(react)!: use Oxc for JSX and add React Compiler support - #17951
Conversation
🦋 Changeset detectedLatest commit: 0b7f8c4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
I don't think this is correct, the oxc still runs and strips types before it reaches babel. I don't think this preserves babel compatibility. I don't think being backwards compatible is important here, we can release this as a major. We just want to document for the user who still wants to use custom babel transformations how they can do so. |
267e3f1 to
018f010
Compare
|
@matthewp Agreed, you're right: preserving JSX doesn't preserve Babel compatibility when Oxc has already stripped the types. I've updated the PR to make this a major release, use I also added a TSX regression test that verifies Babel sees TypeScript syntax before Oxc strips it, with the compiler both on and off. The PR is rebased on |
|
Ok much better, will talk about docs with the @ArmandPhilippot about the docs and see when we can get this in. |
|
@matthewp Do you have a rough sense of when this might land e.g., days or weeks? Selfishly, I’m excited to use it myself 🙂 No rush, just figuring out whether to wait or use patch-package with these changes in the meantime. |
018f010 to
7b4f56d
Compare
7b4f56d to
f44be21
Compare
Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
Changes
@astrojs/reactto@vitejs/plugin-reactv6, using Oxc for JSX transforms and Fast Refresh.react({ compiler: true }). Requiresoxc-transform-react; React 17 and 18 also requirereact-compiler-runtime.babelintegration option. Custom Babel transforms can be configured through@rolldown/plugin-babelinvite.plugins. Includes a major changeset and migration guidance.Closes #17952. Related to #14955.
Testing
Docs