We have multiple environments, and we have environment files which having backend configarations and we are using these files during the builds.
Example: ng build –c UAT
But I have a issue here, now we decided to build only once and deployment multiple environments same artifact.
I know this is quite achievable using an Angular service and the APP_INITIALIZER token, but some reason we can’t use this.
So I decided to after the build, modify the compiled js files(main.js) with respective env configuration values. But it’s becoming difficult because of increased number of env variable and its patterns.
Source: AngularJS Questions