main.js(compiled js-files) file from an angular artifact using with other build artifacts

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

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.