You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We’ve been using Nx in an integrated workspace setup where all apps and libs share a single package.json at the root. This works well for a lot of use cases, but now we have a different requirement:
We want to keep the Nx-powered monorepo benefits (project graph, affected commands, caching, code generation, etc.).
At the same time, we need to develop three independent applications within the same workspace:
A React app
An Angular app
A NestJS backend
The key requirement is that each app should have its own package.json and manage its own dependencies autonomously, while still allowing for:
Shared dependencies and shared internal libraries where it makes sense
All the usual Nx advantages for orchestration, task running, and dependency graph analysis
I came across the Nx docs about “package-based” vs “integrated” workspaces, but it seems the package-based option is marked as deprecated. Right now I’m unsure what the recommended way is to set up a workspace where apps can have full autonomy (per-app dependencies and isolated node_modules) but still benefit from Nx’s tooling in a true monorepo setup.
What’s the best way to achieve this in Nx today? Should we combine Nx with something like pnpm workspaces or Yarn workspaces for per-project dependencies, or is there a modern Nx pattern for this kind of setup?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
We’ve been using Nx in an integrated workspace setup where all apps and libs share a single package.json at the root. This works well for a lot of use cases, but now we have a different requirement:
We want to keep the Nx-powered monorepo benefits (project graph, affected commands, caching, code generation, etc.).
At the same time, we need to develop three independent applications within the same workspace:
The key requirement is that each app should have its own package.json and manage its own dependencies autonomously, while still allowing for:
Shared dependencies and shared internal libraries where it makes sense
All the usual Nx advantages for orchestration, task running, and dependency graph analysis
I came across the Nx docs about “package-based” vs “integrated” workspaces, but it seems the package-based option is marked as deprecated. Right now I’m unsure what the recommended way is to set up a workspace where apps can have full autonomy (per-app dependencies and isolated node_modules) but still benefit from Nx’s tooling in a true monorepo setup.
What’s the best way to achieve this in Nx today? Should we combine Nx with something like pnpm workspaces or Yarn workspaces for per-project dependencies, or is there a modern Nx pattern for this kind of setup?
Beta Was this translation helpful? Give feedback.
All reactions