IonicModule.forRoot won't load imported config object when building with --prod

I successfully build my app with
ionic cordova build android --prod

the app loads but an error occur since the injected Config object is not populated with the object passed in a forRoot call in

import {config} from "file.ts"
@NgModule({
  ...
  imports: [
    ...
    IonicModule.forRoot(MyApp, config)
   ...

in my app.module.ts . And in file.ts I have

export let config = {key:value, ...};

The same IonicModule.forRoot code, instead, works well in dev mode. What I am doing wrong?

1 Like

Actually I have the same issue trying to disable animations with “@ionic/angular”: “^4.11.5”.

Any update on this?