{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"test-ionic-add": {
"projectType": "application",
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
// ...
"ionic-cordova-serve": {
"builder": "@ionic/angular-toolkit:cordova-serve",
"options": {
"cordovaBuildTarget": "app:ionic-cordova-build",
"devServerTarget": "app:serve"
},
"configurations": {
"production": {
"cordovaBuildTarget": "app:ionic-cordova-build:production",
"devServerTarget": "app:serve:production"
}
}
},
"ionic-cordova-build": {
"builder": "@ionic/angular-toolkit:cordova-build",
"options": {
"browserTarget": "app:build"
},
"configurations": {
"production": {
"browserTarget": "app:build:production"
}
}
}
}
}
},
"defaultProject": "test-ionic-add"
}
/workspace/dev/test-ionic-add> ionic info
[WARN] You are not in an Ionic project directory. Project context may be missing.
Ionic:
Ionic CLI : 5.4.4
Utility:
cordova-res : not installed
native-run : 0.2.9
System:
NodeJS : v10.16.3
npm : 6.12.0
OS : Linux 4.12
Description:
The new
ng add @ionic/angularsupport (#3369) uses a hardcodedappproject key and the updatedangular.jsonfile is invalid.Steps to Reproduce:
npm install -g @angular/cli@latestng new test-ionic-addcd test-ionic-add/ng add @ionic/angularangular.jsonand check the targets for the new builders and you will see that they all reference a project namedapp, instead of using the one determined in ngAdd. For exampleapp:buildshould betest-ionic-add:build. With this fixed and an addedionic.config.jsonfile, you can run the project in Ionic LabOutput:
My
ionic info:Other Information: