Skip to content

chore: use oxc-transform-react instead of babel - #539

Open
DMartens wants to merge 1 commit into
eslint:mainfrom
DMartens:use-oxc-transform-react
Open

DMartens wants to merge 1 commit into
eslint:mainfrom
DMartens:use-oxc-transform-react

Conversation

@DMartens

@DMartens DMartens commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Prerequisites checklist

AI acknowledgment

  • I did not use AI to generate this PR.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

What is the purpose of this pull request?

Use the native React compiler pipeline instead of babel.
This should give a speedup and we can remove the babel dependency as we do not use it for other transformations.

What changes did you make? (Give an overview)

Applied the steps in the migration guide for vite:

  • Remove babel dependencies and references in the vite config
  • Use oxc-transform-react by passing compiler: true to the react vite plugin

I could not use the latest version of oxc-transform (0.149.0) as this gave peer dependency issues.

Related Issues

None

Is there anything you'd like reviewers to focus on?

Summary by CodeRabbit

  • Refactor
    • Updated the build configuration to enable React Compiler support directly through the React tooling.
    • Replaced the previous Babel-based transformation setup with the newer React transformation tooling.

@netlify

netlify Bot commented Sep 10, 2026

Copy link
Copy Markdown

Deploy Preview for eslint-code-explorer ready!

Name Link
🔨 Latest commit d24c7a6
🔍 Latest deploy log https://app.netlify.com/projects/eslint-code-explorer/deploys/6aa282702e85fe00083365de
😎 Deploy Preview https://deploy-preview-539--eslint-code-explorer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 26150947-6998-4ac9-863b-a4fd5b015c23

📥 Commits

Reviewing files that changed from the base of the PR and between a6efbdb and d24c7a6.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • package.json
  • vite.config.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The build configuration replaces Babel-based React compiler integration with oxc-transform-react and enables the compiler through @vitejs/plugin-react.

Changes

React compiler migration

Layer / File(s) Summary
React compiler plugin configuration
vite.config.ts, package.json
vite.config.ts removes the Babel plugin and enables react({ compiler: true }). package.json removes the Babel dependencies and adds oxc-transform-react version 0.145.0.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: pixel998

Merge Risk: ⚪ Minimal · up to d24c7

The build switches React compiler integration from Babel to the supported Oxc-based plugin path. Dependency and plugin resolution are consistent, so the change is mergeable after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: replacing the Babel toolchain with oxc-transform-react and the native React compiler pipeline.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@eslintbot eslintbot added this to Triage Sep 10, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in Triage Sep 10, 2026
@Pixel998

Copy link
Copy Markdown
Contributor

The changes LGTM and I verified the compiled output matches what we get from Babel today.

That said, I don't think we should do the migration yet. The compiler option in @vitejs/plugin-react is still marked experimental, and its peer dependency pins oxc-transform-react to ^0.145.0, so we couldn't take updates (as you already hit with 0.149.0). Let's revisit once the integration is stable.

@Pixel998 Pixel998 moved this from Needs Triage to Blocked in Triage Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Blocked

Development

Successfully merging this pull request may close these issues.

3 participants