Skip to content

Commit 8ba0faf

Browse files
committed
Add development build to angular.json and enable optimization in production
1 parent e608b9d commit 8ba0faf

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

frontend/angular.json

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,25 @@
1313
"build": {
1414
"builder": "@angular-devkit/build-angular:browser",
1515
"options": {
16+
"aot": true,
1617
"outputPath": "dist/my-app",
1718
"index": "src/index.html",
1819
"main": "src/main.ts",
1920
"polyfills": "src/polyfills.ts",
2021
"tsConfig": "src/tsconfig.app.json",
2122
"assets": ["src/favicon.ico", "src/assets"],
2223
"styles": ["src/styles.scss", "src/explorer-theme.scss"],
23-
"scripts": [],
24-
"vendorChunk": true,
25-
"extractLicenses": false,
26-
"buildOptimizer": false,
27-
"sourceMap": true,
28-
"optimization": false,
29-
"namedChunks": true
24+
"scripts": []
3025
},
3126
"configurations": {
27+
"development": {
28+
"vendorChunk": true,
29+
"extractLicenses": false,
30+
"buildOptimizer": false,
31+
"sourceMap": true,
32+
"optimization": false,
33+
"namedChunks": true
34+
},
3235
"production": {
3336
"budgets": [
3437
{
@@ -46,21 +49,22 @@
4649
"outputHashing": "all",
4750
"sourceMap": false,
4851
"namedChunks": false,
52+
"aot": true,
4953
"extractLicenses": true,
5054
"vendorChunk": false,
5155
"buildOptimizer": true
5256
}
5357
},
54-
"defaultConfiguration": ""
58+
"defaultConfiguration": "production"
5559
},
5660
"serve": {
5761
"builder": "@angular-devkit/build-angular:dev-server",
5862
"options": {
59-
"browserTarget": "my-app:build"
63+
"browserTarget": "my-app:build:development"
6064
},
6165
"configurations": {
6266
"production": {
63-
"browserTarget": "my-app:build:production"
67+
"browserTarget": "my-app:build:development"
6468
}
6569
}
6670
},

0 commit comments

Comments
 (0)