Connection to REST http server fails when building app with --prod switch

Everything works fine with the application, I can build and use it when not using the--prod switch, but as soon as I want to build it with optimized files (the build goes ok) , the app can no longer access the REST server. The issue is present on both android and ios. I’m using angular’s http class to access the server.

Any idea what can cause this is much appreciated!

here is my ionic info:

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 8.0.0 

local packages:

    @ionic/app-scripts : 3.1.7
    Cordova Platforms  : android 6.3.0 ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v7.10.0
    npm               : 4.2.0 
    OS                : Linux 4.14

Environment Variables:

    ANDROID_HOME : /opt/android-sdk

Misc:

    backend : pro

I have been experimenting with build command, and I added separate parameters to it - narrowed the problem down to --minifyjs , if I build it like this: ionic cordova build --release --aot --minifycss --optimizejs android everything seems to be working, when I add --minifyjs flag, the problem is there , so for example: ionic cordova run--minifyjs android will produce a non working application.

i think this is a related issue https://github.com/ionic-team/ionic-app-scripts/issues/1032