diff --git a/packages/angular/cli/lib/config/schema.json b/packages/angular/cli/lib/config/schema.json index b87f3b70a110..5bd45a03dc44 100644 --- a/packages/angular/cli/lib/config/schema.json +++ b/packages/angular/cli/lib/config/schema.json @@ -327,12 +327,40 @@ "additionalProperties": { "$ref": "#/definitions/project/definitions/target" } + }, + "targets": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/project/definitions/target" + } } }, "required": [ "root", "projectType" ], + "anyOf": [ + { + "required": ["architect"], + "not": { + "required": ["targets"] + } + }, + { + "required": ["targets"], + "not": { + "required": ["architect"] + } + }, + { + "not": { + "required": [ + "targets", + "architect" + ] + } + } + ], "additionalProperties": false, "patternProperties": { "^[a-z]{1,3}-.*": {}