Issue on ionic v8 + capacitorJs + angular 19

Hello,
I have a strange issue. To reproduce:

  1. Create a simple “tabs” (ionic start) project with Angular 19 on the latest version.
    ionic serve: works fine.
  2. Add Capacitor:
npm cap add android  
ionic build  
npx cap sync  
  1. Then, with Android Studio, I deploy to Android and get an error:
    "NullInjectorError: No provider for ho!"

If I add "optimization": false in the configurations of angular.json:

ionic build  
npx cap sync  

Then, with Android Studio, I deploy to Android: it works fine.

It seems like “uglification” causes an issue with Angular 19 in combination with Ionic and Capacitor.

If I downgrade to Angular 18, the problem disappears.

Did I miss something?

Can anyone let me know if they’re experiencing the same issue?

Just for information, the issue is not link to capacitor.
In fact, if you tried to run the compiled project locally from www, we have the same problem

https://stackblitz.com/~/github.com/devilalex505/test-ez0kwm
1 . ng build
2 . node run.js

I can confirm the same behavior. Angular 19 generates Injector errors if optimized (in my case cr!), works fine if optimization is set to false. I can also confirm that it works if you back down to Angular 18.