I am splitting my application into two different services. This requires me to factor out the data access code in a separate library. Unfortunately, I do not see a fileReplacement option in workspace.json for the library.
I need to have different settings likes query logging on or off, caching in memory or Redis, and discovery services based on the environment. I was hoping that I will configure various env settings under libs/data/src/environments and switch to appropriate env during the build.
Can someone help me how to achieve this?
Unfortunately, the fileReplacement has to be done in the app config. But you can pass files from the lib there as follows:
{
"replace": "libs/environment/src/environments/environment.ts",
"with": "libs/environment/src/environments/environment.prod.ts"
}
Most helpful comment
Unfortunately, the
fileReplacementhas to be done in the app config. But you can pass files from thelibthere as follows: