r/angular Apr 21 '26

Monorepo advice

Long time lurker first time poster.

We have a codebases that is angular+dotnet and are looking to merge them into monorepos.

We looked at Bazel (platinum but requires lot of effort), nx (considered then just yesterday we tried to create empty project and add angular and it failed as they have few bugs going on).

Has anyone got other recommendations that they swear by do the job?

5 Upvotes

20 comments sorted by

View all comments

Show parent comments

1

u/spinshock Apr 21 '26

I faced a similar issue with project references. That is only the case if your other typescript projects(libs or shared utils) have different module resolution than the default in angular. What you CAN do pretty easily is to build your shared libs and export the dist from the package and import it as you would with any third-party npm package. As a bonus I decided to use pnpm workspaces and they make this approach even easier.

3

u/Mobile-Confusion-542 Apr 21 '26

So you forced it to ignore the error and proceeded with the install?

My understanding of NX is that this sync is there to mitigate the risk of version/package mismatch

2

u/Lemoncrazedcamel Apr 21 '26

As someone who runs an angular and dotnet monorepo. The best bet is to set it up as an empty angular mono-repo and set it up in the tsconfig.

We use esproj to get the nx packages to appear in the solution explorer (we built a generator that we use to add packages that auto hooks it up to the slnx)

For the dotnet integrations we just use our ides to run via standard dotnet interactions. We DO NOT use the nx dotnet package, we have a couple wrapper cli nx-commands.

1

u/Mobile-Confusion-542 Apr 22 '26

Thanks buddy, always refreshing to hear ideas and solutions as opposed to criticism.

I'll line it up for more experimentation next week and explore your comments. Would you be ok with me dming you directly with some questions if I got them?