diff --git a/packages/angular/cli/lib/config/schema.json b/packages/angular/cli/lib/config/schema.json index 3fc2e39275bd..8a313ea14553 100644 --- a/packages/angular/cli/lib/config/schema.json +++ b/packages/angular/cli/lib/config/schema.json @@ -607,9 +607,28 @@ "additionalProperties": false }, "optimization": { - "type": "boolean", "description": "Enables optimization of the build output.", - "default": false + "oneOf": [ + { + "type": "object", + "properties": { + "scripts": { + "type": "boolean", + "description": "Enables optimization of the scripts output.", + "default": true + }, + "styles": { + "type": "boolean", + "description": "Enables optimization of the styles output.", + "default": true + } + }, + "additionalProperties": false + }, + { + "type": "boolean" + } + ] }, "fileReplacements": { "description": "Replace files with other files in the build.", @@ -1067,8 +1086,28 @@ "default": true }, "optimization": { - "type": "boolean", - "description": "Enables optimization of the build output." + "description": "Enables optimization of the build output.", + "oneOf": [ + { + "type": "object", + "properties": { + "scripts": { + "type": "boolean", + "description": "Enables optimization of the scripts output.", + "default": true + }, + "styles": { + "type": "boolean", + "description": "Enables optimization of the styles output.", + "default": true + } + }, + "additionalProperties": false + }, + { + "type": "boolean" + } + ] }, "aot": { "type": "boolean", @@ -1515,9 +1554,28 @@ "additionalProperties": false }, "optimization": { - "type": "boolean", "description": "Enables optimization of the build output.", - "default": false + "oneOf": [ + { + "type": "object", + "properties": { + "scripts": { + "type": "boolean", + "description": "Enables optimization of the scripts output.", + "default": true + }, + "styles": { + "type": "boolean", + "description": "Enables optimization of the styles output.", + "default": true + } + }, + "additionalProperties": false + }, + { + "type": "boolean" + } + ] }, "fileReplacements": { "description": "Replace files with other files in the build.",