title: Monorepo pattern for two different angular applications?
body: <p>Until now we had a single angular 8 application. But now we have to create a new admin app whose UI would be similar to the existing application (similar UI as in similar login component, sidebar, navbar, etc). Since these two applications would be deployed on two different servers but sharing components with each other, we decided to keep two different source codes under one repo with a shared component library.</p>
  
  <p>Our existing application is generated using <a href="https://www.jhipster.tech/using-angular/" rel="nofollow noreferrer">Jhipster</a>.</p>
  
  <p><strong>Following two approaches I found could be useful for maintaining two different applications.</strong></p>
  
  <p>I read the article at <a href="https://angular.io/guide/creating-libraries" rel="nofollow noreferrer">Creating Libraries for Angular</a>. However, I could not find any material on how to change the existing build process to build two different applications? All the articles I read had Angular CLI commands to build different applications. Since we already have webpack as a bundler, how do I configure it to build both of my applications? Basically all my doubts were regarding how to extend the existing tools that we are using to build, test and maintain these two different applications.</p>
  
  <p>Then I read about monorepo pattern and came across <a href="https://nx.dev/angular/getting-started/what-is-nx" rel="nofollow noreferrer">Nx</a> by <a href="https://nrwl.io" rel="nofollow noreferrer">nrwl.io</a>. As far as I understood its a wrapper on top of angular CLI to support monorepo pattern and comes with all the tools I would need to maintain both applications.</p>
  
  <p>So my question is, Is monorepo pattern worth going for when you only have to share code between two applications? This is in terms of the ease of development vs the time it would take to convert the existing application to support monorepo pattern (setting up tooling as there is in <a href="https://nx.dev/angular/getting-started/what-is-nx" rel="nofollow noreferrer">Nx</a>) which I have read is a bit of a headache.</p>