-
feat(react): update app and lib generators to support new TS solution setup (#28808)
发布于
2024-11-29 03:18:45 +00:00 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
--workspacesflag when usingnpx create-nx-workspaceand choosing React stack. If you use the None/TS
stack then adding plugins likenx add @nx/reactthen 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)
Co-authored-by: Leosvel Pérez Espinosa leosvel.perez.espinosa@gmail.com
Co-authored-by: Nicholas Cunningham ndcunningham@gmail.com下载附件