Prefer Oxc's React Compiler instead of Babel - #857
Merged
Conversation
✅ Deploy Preview for ucmacm ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
A couple of days ago, Oxc released support for the Rust port of the React Compiler. Due to several issues with Meta's version, they basically forked it and made it work on their systems instead. We use to use the Babel-based version of the React Compiler
babel-plugin-react-compiler, but when building via Rolldown, the work done by the React Compiler was done on a JS thread, causing it to slow the build times and throwing warnings saying that the React Compiler took too much of the plugin timings. Now as@vitejs/plugin-reactsupports Oxc's new version of the React Compiler (found inoxc-transform-react), we basically use the full power of Rolldown to run our React Compiler instead of sending it to a JS thread using Babel. We basically chopped our build times from 10+ seconds to literally just 3 seconds.In addition, due to this native integration, Oxlint now fully support rules that utilize the React Compiler. So, we also adapt our rules to use that instead of relying on
eslint-plugin-react-xandeslint-plugin-react-hooksfor compiler based checks.Also reverts #856 as now we have fixed the root cause of it.
Types of changes
What types of changes does your code introduce to the UC Merced's ACM Chapter Website?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply