· via Hacker News – Front Page (hnrss.org)
Vite's plugin-react adds native Rust React Compiler with reported 17.6x speedup
Vite's plugin-react v6.1.0 can now run the oxc-based Rust React Compiler natively, cutting a 14.3-second compile step to 0.81 seconds in one 1,036-file app while fixing gaps left by the Babel version.
Native React Compiler lands in Vite's React plugin
Version 6.1.0 of @vitejs/plugin-react added an opt-in, experimental route to running the React Compiler natively on the oxc toolchain. According to a post on blog.master.dev that reached the Hacker News front page on September 4, enabling it is a one-line change: pass compiler: true to the plugin in your Vite config. The underlying Rust implementation comes from the oxc team, which released official support for it on August 4, 2026.
The post's author builds Outlyne, a website builder whose frontend is a 1,036-file React Router codebase. After switching that codebase to the native compiler, the compile stage fell from 14.3 seconds with Babel to 0.81 seconds single-threaded, a roughly 17.6x improvement on that portion of the build.
What the numbers cover, and what they don't
The speedup applies only to the compiler step, and most builds do far more than compile React components. In Outlyne's case the full build went from 22.1 seconds to 9.3 seconds, about 2.4x faster overall. Boshen, the oxc project lead, is cited in the post saying preliminary benchmarks put the Rust compiler at more than ten times Babel's speed.
The author frames the gain in practical terms: GitHub Actions minutes have become a real cost line as agent-assisted development increases how often code gets built, and less time spent waiting on CI is its own benefit.
Compatibility fixes beyond raw speed
The author is more enthusiastic about the language support. The Rust compiler has already fixed gaps that were still present in v1.0 of the Babel-based compiler:
- Conditional logic inside try/catch blocks, which blocked many adopters at the initial stable release.
- Reassigning a destructured component prop that is then read inside a nested closure, a pattern previously skipped.
- Computed object property keys, such as dynamically named keys in an object passed to a class utility.
For Outlyne, those fixes meant seven more functions get optimized: five from the try/catch change and two from computed keys. Two patterns still cause the compiler to skip a component or hook: a throw from inside a try block and the logical assignment operators ??=, &&= and ||=. Because active development now happens on the Rust implementation, the argument goes, those fixes arrive for native users when they land, while the Babel path stays where it is.
Lint and build now share one compiler
There is also a consistency benefit. The author previously used Oxlint's React Compiler support while the build ran an older compiler version, and filed a bug against oxc that turned out to be version skew: Oxlint used oxc-transform-react v0.145.0, which supported a pattern the author's v0.144.0 build did not. With both tools on the same compiler, the linter's view of what gets optimized matches the build's, closing the gap where a component could fail to compile without any warning.
How to switch
On Vite v8 or newer with @vitejs/plugin-react, migration mostly means deleting configuration. Install oxc-transform-react, enable the flag and drop @rolldown/plugin-babel:
js // vite.config.js import { defineConfig } from "vite"; import react from "@vitejs/plugin-react";
export default defineConfig({ plugins: [react({ compiler: true })], });
React Router in framework mode runs its own Vite plugin instead of plugin-react. For those setups the post recommends @acusti/vite-plugin-react-compiler, which replaces vite-plugin-babel, babel-plugin-react-compiler and @babel/preset-typescript in the config and works regardless of the rest of the build pipeline.
Why it matters
React Compiler promises automatic memoization, but adopting it has meant paying a Babel-shaped tax on every build. A native Rust path cuts that cost, which matters both for developer feedback loops and for CI budgets that agent-driven workflows keep pushing upward. Just as important, it removes compatibility gaps that silently left components unoptimized, and it aligns linting with the build so bailouts become visible. The feature is still labeled experimental and the headline multipliers apply only to the compile step, so teams should measure their own end-to-end numbers before expecting a 17x build. Still, it marks another significant piece of the JavaScript toolchain moving to Rust, and it makes React Compiler materially cheaper to adopt for Vite users.
- #react
- #vite
- #rust
- #build-tools
- #javascript