Angular 6

Angular 2/x Managing configuration post build

Environment variables in environment.ts that come with ng cli project is good for managing variables until build. Post build,Webpack simply replaces all references with their corresponding string values. You will have to edit minified, bundled main..js file by finding and replacing by the value you gave for the configuration property. It’s doable, but cumbersome to do so manually, because this main.*.js is a long minified single line. If you can live with it, a simple find and replce script before deployment would work well.