Open Elyahou opened 8 months ago
If a workspace extends configuration in nx.json and also define some targetDefaults, the extended targetDefaults get overrided.
nx.json
targetDefaults
The extended config is not entirely overrided but is merged with the config defined in nx.json
No response
A
-
Fix: Replace shallow merge with deep merge here: https://github.com/nrwl/nx/blob/7409125639cdf6d9f21fd9fa63d2b92f95669c28/packages/nx/src/generators/utils/nx-json.ts#L24-L26
Is there any news about this issue ?
Current Behavior
If a workspace extends configuration in
nx.json
and also define sometargetDefaults
, the extendedtargetDefaults
get overrided.Expected Behavior
The extended config is not entirely overrided but is merged with the config defined in
nx.json
GitHub Repo
No response
Steps to Reproduce
targetDefaults
and a NX workspace B that extends the config from packageA
in itsnx.json
file.targetDefaults
in intsnx.json
file.targetDefaults
from A will be overrided entirelyNx Report
Failure Logs
No response
Package Manager Version
-
Operating System
Additional Information
Fix: Replace shallow merge with deep merge here: https://github.com/nrwl/nx/blob/7409125639cdf6d9f21fd9fa63d2b92f95669c28/packages/nx/src/generators/utils/nx-json.ts#L24-L26