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


#1

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?