0

I've been back and forth and spend tons of hours looking through Stackoverflow and the web at large, and I still have not been able to find an workable answer to this delimma.

For our application, as shown from the below excerpts from package.json, we are using the following excerpts:

"ionic-angular": "^3.9.2"

"@ionic/app-scripts": "3.1.9"

  "config": {
    "ionic_generate_source_map": "false",
    "ionic_webpack": "./config/webpack.config.js",
    "ionic_copy": "./copy-custom.js"
  }

I have a (seemingly correct) webpack.config.js file (below) enter image description here

When I do a build, it appears as if everything is going to the --prod builds, but it is sill pulling from my dev settings (as verified be my testers). I even set up an environment variable on our mobile app to show the env settings, and they are showing production.

enter image description here

Yet, .... the dev(test) data that is entered in the environment.ts file is overriding everything, and constantly being used as the env values. How is this possible? I have looked at every link I can find, but no luck. I cannot upgrade to ionic 4 at the moment as there will be breaking changes; our current code base is heavily linked to ionic 3.

Any advice?

  • Related? https://stackoverflow.com/questions/48082565/process-env-ionic-env-is-returning-dev – Caramiriel Jul 06 '19 at 21:12
  • let me guess.. you are using windows?;) i had same problem had to use cross-env library to work around this. if interested i can try posting my solution at that time – Sergey Rudenko Jul 06 '19 at 23:42
  • No. I am a sole Mac user. I’d still be interested in your solution . –  Jul 07 '19 at 00:30

0 Answers0