How the angular cache can interfere with the build of an application.
I was reading this nice article about Angular cache (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.
The project
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 tsconfig file takes care of telling Angular where the source code is so that we don’t need to install the library.
For this project, we won’t be using the library directly, but we will publish it to any kind of registry compatible with npm and install it with npm install command.
I had 2 tools available :
- A free demo account with jfrog.io that allows you to host your Artifactory registry in the cloud. You get a domain name like `https://username.jfrog.io` and can publish right away.
- A local install of Verdaccio running next to our app.