My issue with ionic capacitor build --prod ios
is that my working components starting with the likes of
<ion-content>
<ion-grid class="ion-no-padding">
<ion-row>
<ion-col>
fail build with
'ion-grid' is not a known element:
1. If 'ion-grid' is an Angular component, then verify that it is part of this module.
2. If 'ion-grid' is a Web Component then add 'CUSTOM_ELEMENT
Without the --prod
it works fine. However, without the --prod
I am not able to sucessfully run
import { Component, enableProdMode } from '@angular/core';
...
try{
enableProdMode();
}catch{
this.logger.logError('Prod Mode Failed');
}
I managed to get --prod
to build with setting aot
and buildOptimizer
in angular.json
to false
"aot": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false,
However, this seems to make the --prod
irrelevant? At least enableProdMode
is still failing... ?
Adding CUSTOM_ELEMENTS_SCHEMA
like proposed here has not made any difference either.