I have created a library for handling my tokens during local development. It contains a CLI tool which dynamically fills a JSON file with the current tokens, and a JavaScript function to load the tokens from the JSON file into my Angular application. With the Webpack-based builder it worked perfectly. But after I switched to the application builder, I started to have issues with the cache. Initially it works fine, but as soon as my tokens expire and I run the CLI tool to update the tokens, the JSON file is updated, but still the old tokens are used in my app. After some investigation I found out that the tokens are stored in the .angular folder (cache). For now I have disabled the cache via ng cache disable which works fine. However I would like to use the cache for faster builds, and just exclude this library from the caching. How can I achieve this? Continue reading...