From 6b65e4cbc32520a22b5b575ff48eedbedd4a12a7 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 6 Dec 2018 09:03:53 +0100 Subject: [PATCH] feat(@angular/cli): update optimization options --- packages/angular/cli/lib/config/schema.json | 70 +++++++++++++++++++-- 1 file changed, 64 insertions(+), 6 deletions(-) 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.",