21 Commits

Author SHA1 Message Date
Colum Ferry
7351a1a25e
feat(react): add rspack module federation support (#27696)
- feat(react): add remote rspack module federation support
- feat(react): add host rspack module federation support
- feat(react): add federate module rspack module federation support
- fix(react): migration test

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
We do not have an option to generate a react host and remote with rspack


## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Add rspack as an option when generating host and remote

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

Fixes #
2024-09-06 09:54:27 -04:00
Nicholas Cunningham
826e6ab397
feat(core): Refresh welcome screens based on Nx Cloud (#27313)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
Currently, when you create an app we always show `nx connect` regardless
if the workspace has already setup Nx Cloud.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Now, we:
- show `nx connect` if you have no opted into Nx Cloud
- show a CTA to finish your setup if you have setup your workspace on Nx
cloud but have yet to claim it
- show a CTA to learn more if your workspace has been claimed in Nx
Cloud

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
2024-08-09 13:23:51 -04:00
Jack Hsu
45c458e677
fix(react): generate valid Vite + JSX setup for React (#27130)
The current `@nx/react:app` generator does not take the `--js` option
into account. There are two problems:

1. `index.html` includes `main.tsx` not `main.jsx`.
2. `.js` files with JSX are invalid in Vite, and must be named `.jsx`.

This PR adds a new option to the `toJS` devkit util to preserve `.jsx`
rather than renaming them to `.js`. The vast majority of non-Vite React
projects will use `.js` and not `.jsx` (e.g. Next.js, Expo, Remix, etc.)
so we just want to apply this change to Vite only for now.

In the future we could enhance React generators to support `--jsx`, for
example.

## 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 #20810
2024-07-26 08:30:16 -04:00
Colum Ferry
3b384c78ac
feat(react): add tailwind as style prompt option for app gen (#21784) 2024-02-14 17:51:37 +00:00
Remco Krams
c87884ad6e
fix(react): generate correctly when --js is used for module federation host/remote (#20119)
Co-authored-by: Jack Hsu <jack.hsu@gmail.com>
2024-02-12 20:42:11 +00:00
Jack Hsu
507fe42e4f
feat(webpack): add plugin to automatically configure build and serve targets (#20243) 2023-11-28 13:01:03 -05:00
Jack Hsu
750f485b93
fix(web): generate .swcrc file with modern defaults when creating new webapps (#18749) 2023-08-22 07:05:30 -04:00
Jack Hsu
c8a264a932
fix(react): update .swcrc with plugin for CSS-in-JS solution when SWC is used for apps (#17295) 2023-05-30 08:33:08 +03:00
Jack Hsu
f04f316271
feat(react): add rspack experimental support (#16252) 2023-04-19 14:00:24 -04:00
Jason Jean
2d195007b0
feat(core): switch packages to use the @nx scope (#16069) 2023-04-14 19:56:37 -04:00
Emily Xiong
a97212b601
feat(core): move tsconfig.base.json to @nrwl/js:init (#14467) 2023-02-16 11:17:30 -05:00
Dirko Odendaal
ee909cf7a5
feat(misc): conditionally allow starter template inclusion (#14268)
Co-authored-by: Colum Ferry <cferry09@gmail.com>
2023-01-27 15:07:07 +00:00
Jack Hsu
454fba49b2
feat(webpack): generate React and Web apps with webpack.config.js file (#14285) 2023-01-12 10:06:25 -05:00
Emily Xiong
14c1c16cf8
feat(react): add unit test examples when inSourceTests is passed (#13779) 2022-12-14 23:46:13 -05:00
Victor Savkin
91c19f5c0a
feat(misc): do not generate tsconfig.base.json for simple standalone … (#13605) 2022-12-05 10:07:01 -05:00
Jonathan Cammisuli
02e22de7ed
feat(testing): add vitest generators (#13301) 2022-11-23 10:00:29 -05:00
Katerina Skroumpelou
f394608658
feat(bundling): vite generators (#13158) 2022-11-21 13:18:40 -05:00
Leosvel Pérez Espinosa
acc29e9593
fix(misc): support workspaces using a root tsconfig.json instead of tsconfig.base.json (#9195)
* fix(misc): support workspaces using a root tsconfig.json instead of tsconfig.base.json

* cleanup(angular): address pr feedback
2022-03-09 11:30:26 -05:00
Noriyuki Shinpuku
e4f7e2e40b
feat(react): update complier options for strict mode (#8127) 2021-12-14 22:31:40 -05:00
Noriyuki Shinpuku
6cb1dc65d0
feat(react): add strict option to react application generator (#5248) 2021-05-02 22:01:43 -04:00
Jonathan Cammisuli
d9aef75bd5
chore(react): move react schematics to generators (#4745)
* chore(react): move react schematics to generators

* chore(react): update lib generators

* chore(react): update redux generators

* chore(react): move react story book generators

* chore(react): add old implementation for update babel in next

* chore(react): rename tsconfig json template files to include __tmpl__

* chore(react): update deps

* chore(react): fix component template file

* chore(react): remove angular-devkit deps

* chore(react): remove angular-devkit deps
2021-02-10 21:30:55 -05:00