14 Commits

Author SHA1 Message Date
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
Jack Hsu
472dbc370d
fix(js): remove deprecated babel transform (#19671) 2023-10-18 10:44:41 -04:00
Craigory Coppola
dc8b408b1a
feat(react): allow setting react preset to production when using custom BABEL_ENV (#19148) 2023-09-13 17:14:52 -04:00
Jason Jean
2d195007b0
feat(core): switch packages to use the @nx scope (#16069) 2023-04-14 19:56:37 -04:00
Jack Hsu
5e11adbba4
feat(js): move babel preset to @nrwl/js/babel so @nrwl/web is not… (#14478) 2023-01-23 15:32:07 +00:00
Jason Gerbes
4dc331c914
feat(react): improve babel preset options (#10940)
Improved the '@nrwl/react/babel' preset to allow for customisation of all options provided by
the
'@nrwl/web/babel' preset.

ISSUES CLOSED: #10939

Co-authored-by: Jason Gerbes <jason.gerbes@vista.co>
2022-09-22 11:16:29 -04:00
Vaughan Reid
b50d7e4b0c
fix(react): nextjs check causes linting commands to fail (#5705)
* fix(react): is next js check caller is sometimes undefined

* fix(react): refactor to optional chaining

Co-authored-by: Mark Goho <markgoho@gmail.com>

Co-authored-by: Mark Goho <markgoho@gmail.com>
2021-05-22 13:16:16 -04:00
Kirils L
d251a4f49f
feat(nextjs): update to 10.2.0 (#5503) 2021-05-06 00:05:40 +03:00
Jack Hsu
a647e19303
feat(react): use "@babel/plugin-transform-runtime" so babel helpers can be reused (#5257) 2021-04-07 06:08:12 +00:00
Jack Hsu
c84bbb3c93
feat(react): add support for new jsx transform (#5131) 2021-04-01 13:46:12 +00:00
Jack Hsu
ddec362a5a
fix(nextjs): update babel setup to better support next apps (#4944)
* fix(nextjs): update babel setup to better support next apps

* fix(testing): remove babel-jest.config.json used in jest.config.js

- Fix `@nrwl/web/babel` to support Jest as well
2021-03-09 21:32:36 +00:00
Jack Hsu
d593153a33
feat(react): refactored babel support so options are more easily customized (#3089)
This reverts commit 7679df22f5b90d085b5f32f2135d828036ee5aa7.
2020-05-29 02:09:47 -04:00
Victor Savkin
7679df22f5 Revert "feat(react): refactored babel support so options are more easily customized (#3058)"
This reverts commit 0e036272cbe156fe9750a2f2bc6498a08cf7f457.
2020-05-28 13:11:56 -04:00
Jack Hsu
0e036272cb
feat(react): refactored babel support so options are more easily customized (#3058) 2020-05-26 09:16:36 -04:00