I have a rather complex angular.json
because I have multiple projects. What I would like to have is separate environment.ts files per project. Replacing the environment file when the build target is production seems to be pretty straightforward:
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/private-label/redacted/environments/environment.prod.ts"
}
],
}
}
What I'm looking for is a way to do the same with the default/development configuration. The angular.json
does not contain a configuration node for anything like that that I can find and so I'm not sure if it is possible and/or where to specify fileReplacements
when not targeting production.
Of course, if there is a better way to handle environments per project that I'm not seeing I would also be interested in that.