HMS-Core / hms-cordova-plugin

This repo contains all of Cordova HMS plugins.
https://developer.huawei.com/consumer/en/doc/overview/HMS-Core-Plugin?ha_source=hms1
Apache License 2.0
96 stars 44 forks source link

Ionic/Angular13 with aot: true cause JIT compiler unavailable #92

Open winnievips opened 2 years ago

winnievips commented 2 years ago

Ionic 6 when using configuration aot true, when build to App will show JIT unavailable. During development configuration for aot false can works fine..Only when production it hit this issue. Any ways to resolve it? I tried import '@angular/compiler'; in main.ts OR in tsconfig.json "angularCompilerOptions": { "enableIvy": false, / true "compilationMode": "partial" }

Screenshot 2022-06-01 at 6 16 17 PM Screenshot 2022-06-01 at 5 49 26 PM
sinemsevilmis commented 2 years ago

Hi @winnievips,

Default value of buildOptimizer is true. But this package is deprecated and should not be used.

Please follow the steps below:

  1. import '@angular/compiler' in main.ts. NOTE: import 'reflect-metadata' should be kept in first line.
  2. set "buildOptimizer" false in angular.json.

If this will not solve your issue, contact us here.

winnievips commented 2 years ago

Hi @sinemsevilmis ,

every hms plugin is deprecated or just this cordova-plugin-hms-availability? Any other upgraded package we could use in ionic/capacitor project? Because we would like to have buildOptimizer option in our project.

TQ.