Jack Hsu 653cad2492
feat(react): add support for React Compiler in @nx/react/babel (#26826)
This PR adds a check in `@nx/react/babel` preset to enable React
Compiler when `babel-plugin-react-compiler` is installed.

This affects:

- React apps using Webpack + Babel
- React libs using Rollup + Babel
- React Native apps using Webpack + Babel

If SWC is used, there is no way to use React Compiler currently.

Also adds a [new
recipe](https://nx-dev-git-feat-react-compiler-nrwl.vercel.app/recipes/react/react-compiler)
showing how to enable the compiler using `@nx/react/babel`.

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
2024-07-04 16:18:34 -04:00
2024-07-04 08:57:27 -04:00
2019-03-07 13:23:11 -05:00

Nx - Smart Monorepos · Fast CI

CircleCI License NPM Version Semantic Release Commitizen friendly Join the chat at https://gitter.im/nrwl-nx/community Join the Official Nx Discord Server


Smart Monorepos · Fast CI

Nx is a build system with built-in tooling and advanced CI capabilities. It helps you maintain and scale monorepos, both locally and on CI.

A few links to help you get started:

Nx - Smart Monorepos · Fast CI

Engage with the Core Team and the Community

Want to help?

If you want to file a bug or submit a PR, read up on our guidelines for contributing and watch this video that will help you get started.

Nx - How to contribute video

Core Team

Victor Savkin Jason Jean Benjamin Cabanes Jack Hsu
Victor Savkin Jason Jean Benjamin Cabanes Jack Hsu
vsavkin FrozenPandaz bcabanes jaysoo
Jo Hanna Pearce Jon Cammisuli Isaac Mann Juri Strumpflohner
Jo Hanna Pearce Jon Cammisuli Isaac Mann Juri Strumpflohner
jdpearce cammisuli isaacplmann juristr
Philip Fulcher Caleb Ukle Katerina Skroumpelou Colum Ferry
Philip Fulcher Caleb Ukle Katerina Skroumpelou Colum Ferry
philipjfulcher barbados-clemens mandarini Coly010
Emily Xiong Miroslav Jonaš Leosvel Pérez Espinosa Zachary DeRose
Emily Xiong Miroslav Jonaš Leosvel Pérez Espinosa Zachary DeRose
xiongemi meeroslav leosvelperez ZackDeRose
Craigory Coppola Chau Tran Nicholas Cunningham Max Kless
Craigory Coppola Chau Tran Nicholas Cunningham Max Kless
AgentEnder nartc ndcunningham MaxKless
Description
No description provided
Readme 619 MiB
Languages
TypeScript 95%
Rust 2.9%
JavaScript 1.3%
Kotlin 0.3%
MDX 0.3%
Other 0.1%