--prod flag in Capacitor Project

Hi, I’m trying to build my app for production like this:

ionic build --prod
npx cap copy
npx cap sync

then I open the IDE ( let’s say Xcode) but when I launch my app on device, it takes 5-6s to hide splash screen while on Cordova Projects which I compile with “ionic Cordova build --prod” it takes 3ish seconds to boot…

There’s something I’m getting wrong and I’m not telling the compiler to build with prod flag (or maybe boot time is longer for capacitor?) for sure but that’s my first Capacitor production project.

Thanks in advance!

Are you hiding the splash-screen by calling Plugins.SplashScreen.hide()? If not, that would cause a delay.

1 Like

That was exactly the issue!
Thank you so much Mike!

1 Like