I am working with Angular 9 and I have a config.json file which is loaded during run-time. I have dev/config.json and prod/config.json which are loaded depending on if I am running the app locally or building it for production. Up till now I have been manually commenting file paths like this:
// this.configPath = '/config/config-dev.json';
this.configPath = '/config/config-prod.json';
It would be more convenient if the path would always be the same:
this.configPath = '/config/config.json';
and the corresponding config.json would be copied depending if I am running locally or building for prod: e.g. in angular.json.
"architect": {
"build": {
"options": {
"assets": [
"src/favicon.ico",
"src/favicon-16x16.png",
"src/favicon-32x32.png",
"src/assets",
"src/config/dev/config.json",
or "src/config/prod/config.json",
Is it possible to setup angular.json to detect which config file should be used and to copy it to the config folder?