5

process.env.IONIC_ENV is returning dev always.

Here is the script I've used. ionic serve --prod

But process.env.IONIC_ENV is returning dev instead of prod.

Any thoughts?

Thanks.

Patrick Blind
  • 399
  • 1
  • 4
  • 15
  • Let me know if this is a duplicate of [this](https://stackoverflow.com/questions/39535386/how-to-check-if-angular-2-app-is-running-in-production-or-dev) – Philip Brack Jan 03 '18 at 18:22
  • Thanks @PhilipBrack but I'm more looking for ionic cli env solution for this since I need to build the ios and android app via cli, as well. – Patrick Blind Jan 04 '18 at 03:28
  • Hi @PatrickBlind. I am faced with the same dilemma. Did you ever find a solution? I am using ionic-angular 3.9.2. See my posting at https://stackoverflow.com/questions/56917641/ionic-angular-3-9-2-ignores-prod-and-only-does-dev-builds –  Jul 06 '19 at 21:39

0 Answers0