Swiper.js does not work in production (--prod)


I’m importing swiper.js since I need some custom configuration that is not supported by Ionic swiper. I’m importing it like this import Swiper from 'swiper'. Works in browser, works with dev build and running on device.

But when I do ionic cordova run android --prod something goes wrong. Is it possible to run --prod without minification to test it out?


--prod is minification.

What error message are oyu getting?
Also post your ionic info output please.

The thing is, that I don’t actually get any error message. It just does not work with --prod flag, so I’m trying to figure out how to debug it.

I get instance to swiper.

@ionic/cli-plugin-proxy : 1.4.6
@ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2

global packages:

Cordova CLI : 7.0.0

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : android 6.2.3 ios 4.4.0 windows 5.0.0
Ionic Framework    : ionic-angular 3.6.1


Android SDK Tools : 25.2.5
Node              : v8.3.0
npm               : 5.1.0
OS                : Windows 10