From 8ba0faf948489784e27eec4c816ce6160992685b Mon Sep 17 00:00:00 2001 From: manuelwedler Date: Thu, 23 Sep 2021 18:03:46 +0200 Subject: [PATCH] Add development build to angular.json and enable optimization in production --- frontend/angular.json | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/frontend/angular.json b/frontend/angular.json index e4f5c6c..51dbbcd 100644 --- a/frontend/angular.json +++ b/frontend/angular.json @@ -13,6 +13,7 @@ "build": { "builder": "@angular-devkit/build-angular:browser", "options": { + "aot": true, "outputPath": "dist/my-app", "index": "src/index.html", "main": "src/main.ts", @@ -20,15 +21,17 @@ "tsConfig": "src/tsconfig.app.json", "assets": ["src/favicon.ico", "src/assets"], "styles": ["src/styles.scss", "src/explorer-theme.scss"], - "scripts": [], - "vendorChunk": true, - "extractLicenses": false, - "buildOptimizer": false, - "sourceMap": true, - "optimization": false, - "namedChunks": true + "scripts": [] }, "configurations": { + "development": { + "vendorChunk": true, + "extractLicenses": false, + "buildOptimizer": false, + "sourceMap": true, + "optimization": false, + "namedChunks": true + }, "production": { "budgets": [ { @@ -46,21 +49,22 @@ "outputHashing": "all", "sourceMap": false, "namedChunks": false, + "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true } }, - "defaultConfiguration": "" + "defaultConfiguration": "production" }, "serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { - "browserTarget": "my-app:build" + "browserTarget": "my-app:build:development" }, "configurations": { "production": { - "browserTarget": "my-app:build:production" + "browserTarget": "my-app:build:development" } } },