Commit bc7d88b
fix(core): remove CRA migration logic from nx init (#34912)
## Current Behavior
`nx init` has a special code path for Create React App (CRA) projects
that installs Vite-related dependencies incompatible with `@nx/vite`
when Vite 8 is resolved, causing failures for npm workspaces.
CRA is essentially unused for years so there's no point to keep it
around.
## Expected Behavior
CRA projects are no longer special-cased in `nx init`. They flow through
the normal npm repo path, which detects plugins like `@nx/vite` via the
standard `detectPlugins()` mechanism.
<img width="1279" height="448" alt="Screenshot 2026-03-18 at 2 34 56 PM"
src="https://github.com/user-attachments/assets/17da3c6d-8aef-450f-baaa-6014e03cf41f"
/>
<img width="1280" height="432" alt="Screenshot 2026-03-18 at 2 35 01 PM"
src="https://github.com/user-attachments/assets/e02ccda5-9faf-428f-878d-348e4cc44d74"
/>
<img width="1270" height="821" alt="Screenshot 2026-03-18 at 2 35 15 PM"
src="https://github.com/user-attachments/assets/fdd99af5-db7e-422b-be42-a817c9dcefa2"
/>
## Related Issue(s)
Closes NXC-41071 parent 9d1a565 commit bc7d88b
File tree
24 files changed
+14
-805
lines changed- e2e/nx-init/src
- files/cra
- public
- src
- packages/nx/src/command-line/init
- implementation
- react
24 files changed
+14
-805
lines changedThis file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | 93 | | |
100 | 94 | | |
101 | 95 | | |
| |||
127 | 121 | | |
128 | 122 | | |
129 | 123 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 124 | + | |
137 | 125 | | |
138 | 126 | | |
139 | 127 | | |
| |||
142 | 130 | | |
143 | 131 | | |
144 | 132 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | 133 | | |
157 | 134 | | |
158 | 135 | | |
| |||
0 commit comments