Angular CLI environments not working

Viewed 978

I am working on doing some automated deployments and have discovered that the environment argument isn't doing anything currently on my ng build command. We are currently using ^4.0.0 of the Angular framework and targeting 1.5.2 of the CLI. I've verified that the environment classes are set up right per http://tattoocoder.com/angular-cli-using-the-environment-option/ and I have run the ng build command every way I can think

ng build --prod
ng build -prod
ng build --env=prod

Here is an example of the environment code we are using:

//DEV
export const environment = {
    production: false,
    envName: 'dev'
};

//PROD
export const environment = {
    production: true,
    envName: 'prod'
};

And then here is the environment code from our angular-cli.json

 "environmentSource": "environments/environment.ts",
  "environments": {
    "dev": "environments/environment.ts",
    "prod": "environments/environment.prod.ts"
  }

ect. Any help or insights would be very much appreciated. Thank you so much in advance!

0 Answers
Related