Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(react): update app and lib generators to support new TS solution setup #28808

Merged
merged 73 commits into from
Nov 29, 2024

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Nov 5, 2024

This PR updates app and lib generators in the following packages such that they will generate files with the TS solution setup if it is detected.

  • @nx/react
  • @nx/next
  • @nx/remix
  • @nx/expo
  • @nx/react-native

React apps and libs will be linked using npm/pnpm/yarn/bun workspaces feature rather than through tsconfig paths. This means that local aliases like @/ will work with Next.js and Remix apps.

Note: This will be behind --workspaces flag when using npx create-nx-workspace and choosing React stack. If you use the None/TS stack then adding plugins like nx add @nx/react then generating apps, it will automatically pick up the new TS solution setup.

Current Behavior

React generators are not compatible with TS solution setup (i.e. workspaces + TS project references).

Expected Behavior

React generators work with new TS solution setup (Plain, Next.js, Remix, Expo, React Native).

Related Issue(s)

#28322

Copy link

vercel bot commented Nov 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Nov 29, 2024 2:14am

@jaysoo jaysoo force-pushed the feat/ts-solution-react branch 9 times, most recently from a454c45 to a2e9734 Compare November 12, 2024 13:09
Copy link

🐳 We have a release for that!

This PR has a release associated with it. You can try it out using this command:

npx create-nx-workspace@0.0.0-pr-28808-0f14212 my-workspace

Or just copy this version and use it in your own command:

0.0.0-pr-28808-0f14212
Release details 📑
Published version 0.0.0-pr-28808-0f14212
Triggered by @jaysoo
Branch feat/ts-solution-react
Commit 0f14212
Workflow run 11804472060

To request a new release for this pull request, mention someone from the Nx team or the @nrwl/nx-pipelines-reviewers.

@jaysoo jaysoo force-pushed the feat/ts-solution-react branch from 0f14212 to e812720 Compare November 13, 2024 02:18
@jaysoo jaysoo changed the title feat(react): update app and lib generators to support new TS solution… feat(react): update app and lib generators to support new TS solution setup Nov 13, 2024
@jaysoo jaysoo force-pushed the feat/ts-solution-react branch from 4f67272 to 18a3a8b Compare November 13, 2024 15:09
@jaysoo jaysoo force-pushed the feat/ts-solution-react branch from 18a3a8b to ca32248 Compare November 13, 2024 15:30
@jaysoo jaysoo marked this pull request as ready for review November 13, 2024 15:33
jaysoo and others added 24 commits November 28, 2024 21:04
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
@jaysoo jaysoo force-pushed the feat/ts-solution-react branch from 92a2604 to 4c7d5e6 Compare November 29, 2024 02:04
@jaysoo jaysoo merged commit ec5a5e6 into master Nov 29, 2024
6 checks passed
@jaysoo jaysoo deleted the feat/ts-solution-react branch November 29, 2024 03:18
Copy link

github-actions bot commented Dec 5, 2024

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants