The Rust React Compiler is now native in Vite

(blog.master.dev)

81 points | by acusti 4 hours ago ago

6 comments

  • adzm 3 hours ago

    No more babel in my compilation pipeline, yay!

    • Waterluvian 20 minutes ago

      It’s just the best thing ever. Compiling at work took a minute for full builds with babel, and with rsbuild it now takes about 0.9 seconds.

    • adzm 39 minutes ago

      Update: changed a pet project to use this instead of the babel approach. Literally just did the config changes in the article, no issues. Time from `npm run dev` to ready went from 6 to 2 seconds.

  • syspec 3 hours ago

    Does this work with reacts fancy new compiler that is meant to optimize away various hooks?

    • ownagefool 3 hours ago

      If it wasn't obvious from the article, this is an implementation in the same thing in rust, ergo significantly faster. This was enabled, I presume, by the upstream react introducing code a rust version in source ( but they don't produce a standard binary last I checked )

  • Onavo 26 minutes ago

    Why does the Nextjs version of React compiler require a babel plugin when the vite version doesn't need it? Next.js is on SWC, not sure why they need a babel plugin.