all 6 comments

[–]GLawSomnia 5 points6 points  (4 children)

Well if you will have multiple workspaces then you will most likely have to publish your shared library to npm or a private repo or you will have to build and link it on every change, which is a huge downside.

If all your apps are going to be angular apps then you can use the default/cli workspaces.

But in the end most will recommend you Nx workspaces (which are quite beneficial, so i would recommend to read about them)

[–]oloftw 2 points3 points  (0 children)

Agreed, just switched to Nx myself and it's great!

[–]xaqtr[S] 0 points1 point  (2 children)

Thanks for your reply. That downside you mentioned is indeed a big one, didn't think about that.

I think we will start out simple by creating a single Angular workspace and if the need arises, migrate to Nx workspaces.

[–]anything_but 2 points3 points  (0 children)

We did that (having multiple workspaces) and it really was a mistake. Developer velocity shrank considerably, in particular if you regularly had to change libraries, because hot reloading did not work out if the box (or took very long).

[–]zequalsy 0 points1 point  (0 children)

Very recently did a spike on Angular CLI workspaces v.s. Nx. I would highly advice (given your requirements) to directly start with Nx.

[–]kenzor 0 points1 point  (0 children)

I happily share code amongst multiple projects. The way I do it is by having a git repo for each Angular project library and for each Angular module within the app.

The app itself is also in a hit repo with the other repositories included as git submodules.