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): add react-router plugin #29965

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ndcunningham
Copy link
Contributor

@ndcunningham ndcunningham commented Feb 11, 2025

This PR introduces the React Router plugin in Nx.
The new functionality adds a react-router plugin entry into nx.json, projects that are React-Router V7 via react-router.config.(m|c)?[jt]s will have their targets inferred.

Changes

Update the React plugin to have a react-router (RR V7) plugin export.
The RR V7 will only infer targets if we have a react-router.config.(m|c)?[jt]s and also a vite.config.(m|c)?[jt]s.

Under the hood the RR V7 CLI uses vite for compilation.
That being said, apps are not limited to only use vite for RR V7. Should you choose to use it the compilation will not be done via RR V7 CLI.

Copy link

vercel bot commented Feb 11, 2025

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

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Feb 25, 2025 3:16pm

Copy link

nx-cloud bot commented Feb 11, 2025

View your CI Pipeline Execution ↗ for commit effb167.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 38m 50s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 15s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check --base= --he... ✅ Succeeded 6s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 5s View ↗
nx documentation ✅ Succeeded 57s View ↗

☁️ Nx Cloud last updated this comment at 2025-02-25 15:59:29 UTC

@ndcunningham ndcunningham force-pushed the feat/add-react-router branch 2 times, most recently from 408f6f5 to 10c8669 Compare February 11, 2025 18:06
@ndcunningham ndcunningham marked this pull request as ready for review February 11, 2025 18:10
@ndcunningham ndcunningham requested review from a team as code owners February 11, 2025 18:10
@ndcunningham ndcunningham requested a review from a team as a code owner February 12, 2025 21:14
@ndcunningham ndcunningham self-assigned this Feb 12, 2025
@ndcunningham ndcunningham force-pushed the feat/add-react-router branch 5 times, most recently from 988545d to dfa21e7 Compare February 14, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants