Disable animations for `debug` Cordova builds?

I have to disable animations. Generally this is quite simple, just using this in app.module.ts:

IonicModule.forRoot(MyApp, { animate: false }),`

But now I only want to do that in the debug build, not in release. How would I do that?

I don’t know of an easy way to do this directly at runtime. Best I can think of is to swap out or rewrite part of a source file at build time conditionally looking at process.env.IONIC_ENV.

1 Like