Using Angular cache with library

<p>How the angular cache can interfere with the build of an application.</p> <p>I was reading&nbsp;<a href="https://balramchavan.medium.com/angular-cache-whats-inside-and-how-it-improves-angular-build-timing-on-local-and-ci-pipeline-f6821d22d67a" rel="noopener">this nice article about Angular cache</a>&nbsp;(starting with version 13), and it reminded me that I stumbled upon an issue with this feature regarding the development of libraries. Basically, if you install a library with npm, if the source code of the library changes but not the version number, what happens.</p> <h1>The project</h1> <p>The Angular project we will be using consists of a workspace in which there will be a library and an application. Normally, when we develop an Angular library in the same workspace than the application, the local&nbsp;<code>tsconfig</code>&nbsp;file takes care of telling Angular where the source code is so that we don&rsquo;t need to install the library.</p> <p>For this project, we won&rsquo;t be using the library directly, but we will publish it to any kind of registry compatible with npm and install it with&nbsp;<code>npm install&nbsp;</code>command.</p> <p>I had 2 tools available :</p> <ul> <li>A free demo account with&nbsp;<a href="https://jfrog.com/start-free/" rel="noopener ugc nofollow" target="_blank">jfrog.io</a>&nbsp;that allows you to host your Artifactory registry in the cloud. You get a domain name like `<a href="https://aboudard.jfrog.io/" rel="noopener ugc nofollow" target="_blank">https://username.jfrog.io</a>` and can publish right away.</li> <li>A local install of&nbsp;<a href="https://verdaccio.org/" rel="noopener ugc nofollow" target="_blank">Verdaccio</a>&nbsp;running next to our app.</li> </ul> <p><a href="https://coco-boudard.medium.com/using-angular-cache-with-library-1744e5b8627b">Visit Now</a>&nbsp;</p>