diff --git a/src/Ombi/ClientApp/angular.json b/src/Ombi/ClientApp/angular.json index b139c4bdb..2865231fc 100644 --- a/src/Ombi/ClientApp/angular.json +++ b/src/Ombi/ClientApp/angular.json @@ -25,6 +25,18 @@ "assets": [ "src/assets" ], + "optimization": true, + "buildOptimizer": true, + "aot": true, + "vendorChunk": true, + "extractLicenses": true, + "sourceMap": false, + "namedChunks": true, + "subresourceIntegrity": true, + "allowedCommonJsDependencies": [ + "jquery", + "bootstrap" + ], "styles": [ "node_modules/@angular/material/prebuilt-themes/indigo-pink.css", "src/styles/_imports.scss", @@ -42,11 +54,27 @@ ] }, "configurations": { + "development": { + "optimization": false, + "buildOptimizer": false, + "aot": false, + "vendorChunk": true, + "extractLicenses": false, + "sourceMap": true, + "namedChunks": true, + "subresourceIntegrity": false + }, "production": { "budgets": [ + { + "type": "initial", + "maximumWarning": "2mb", + "maximumError": "5mb" + }, { "type": "anyComponentStyle", - "maximumWarning": "6kb" + "maximumWarning": "6kb", + "maximumError": "10kb" } ], "fileReplacements": [ @@ -55,7 +83,15 @@ "with": "src/environments/environment.prod.ts" } ], - "outputHashing": "all" + "outputHashing": "all", + "optimization": true, + "buildOptimizer": true, + "aot": true, + "vendorChunk": true, + "extractLicenses": true, + "sourceMap": false, + "namedChunks": true, + "subresourceIntegrity": true }, "hmr": { "budgets": [ @@ -75,7 +111,8 @@ "vendorChunk": true, "extractLicenses": false, "sourceMap": true, - "namedChunks": true + "namedChunks": true, + "aot": false } } }, @@ -85,6 +122,9 @@ "buildTarget": "ombi:build" }, "configurations": { + "development": { + "buildTarget": "ombi:build:development" + }, "production": { "buildTarget": "ombi:build:production" }, diff --git a/src/Ombi/ClientApp/package.json b/src/Ombi/ClientApp/package.json index ce94858a7..478938809 100644 --- a/src/Ombi/ClientApp/package.json +++ b/src/Ombi/ClientApp/package.json @@ -3,8 +3,11 @@ "version": "4.0.0", "scripts": { "ng": "ng", - "start": "ng serve --port 3578 --configuration hmr", + "start": "ng serve --port 3578 --configuration development", + "start:hmr": "ng serve --port 3578 --configuration hmr", "build": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build -c production", + "build:dev": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build -c development", + "build:prod": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build -c production", "lint": "ng lint", "docs:json": "compodoc -p ./tsconfig.json -e json -d .", "storybook": "start-storybook -p 6006",