Replies: 2 comments
-
Hey @beeman! Perhaps there is a misunderstanding here on Inferred Projects with new workspaces. The I'm going to convert this issue to a discussion because this is correct behaviour but perhaps it should be discussed more. |
Beta Was this translation helpful? Give feedback.
-
Hi @Coly010, thanks for the quick reply! I indeed think I don't understand how it's supposed to work. As you can see here, we are using first-party plugins to generate these things. We wrap them, but the actual generator is the first party plugin. I would expect this to work just like how it's when I invoke The important part is that I expect this to work predictably and consistently. Currently, it's none. I don't want to force people into disabling inferred plugins as I think it makes sense for people to get a generated project that's as similar as if they would have run the commands themself (create-nx-workspace, install @nx/react, then generate the app). That's why I don't set the Somehow, this is not the case when I extend, but it is the case when I manually invoke it which causes my confusion. |
Beta Was this translation helpful? Give feedback.
-
Current Behavior
In this project we extend the Next and React generators to create apps.
In a default Nx 18 and 19 project (with Crystal) the app that gets generated by our extended generators, the content of
project.json
is verbose as can be seen in this generated app.However, if we generate a second app using the
nx
CLI in the same workspace, the content ofproject.json
is (mostly) using the inferred targets as can be seen here.The curious thing is that this is happening without having set
useInferencePlugins
innx.json
or having the env var set.Expected Behavior
Considering the workspace does not have
useInferencePlugins
set, I would expect the extended generator to behave the same as when we're using the CLI.GitHub Repo
https://github.com/beeman/solana-dapp-react-version
Steps to Reproduce
pnpx create-solana-dapp@next
web/project.json
is verbosepnpm nx g @nx/react:app second --e2e-test-runner none --routing false
second/project.json
is inferred.Nx Report
Failure Logs
No response
Package Manager Version
pnpm 9.0.5
Operating System
Additional Information
This also happened with Nx18 but I decided to wait till Nx19 to make sure it wasn't fixed there.
Somehow,
nx report
fails in my demo project, I'll create a separate issue for that (#23296).Beta Was this translation helpful? Give feedback.
All reactions