Ionic-app-scripts 3.2.0 environments does nor build for --prod

ionic-app-scripts 3.2.0 introduced environments as seen here

I setup everything properly and when I build without the --prod flag it works perfectly by passing the variables defined within into and throughout my app. However when I build with the --prod flag, none of my variables defined within are passed. Instead all of the variables are just undefined. I searched high and low for an answer and have found nothing. Judging by some of the issues on GitHub other people have experienced the same problem and have not found a solution. I’m hoping someone here might be able to shed some light on this.



Did you created file at the root of your app before using --prod flag ?


Yes both and are at the root of my application.