Explorar o código

⚡️ speed up dev builds

jmacura %!s(int64=3) %!d(string=hai) anos
pai
achega
cda33b07a2
Modificáronse 2 ficheiros con 15 adicións e 3 borrados
  1. 13 1
      angular.json
  2. 2 2
      package.json

+ 13 - 1
angular.json

@@ -47,6 +47,14 @@
             "namedChunks": true
           },
           "configurations": {
+            "development": {
+              "buildOptimizer": false,
+              "optimization": false,
+              "vendorChunk": true,
+              "extractLicenses": false,
+              "sourceMap": true,
+              "namedChunks": true
+            },
             "production": {
               "fileReplacements": [
                 {
@@ -75,15 +83,19 @@
               ]
             }
           },
-          "defaultConfiguration": ""
+          "defaultConfiguration": "production"
         },
         "serve": {
+          "defaultConfiguration": "development",
           "builder": "@angular-builders/custom-webpack:dev-server",
           "options": {
             "port": 8080,
             "browserTarget": "attractiveness:build"
           },
           "configurations": {
+            "development": {
+              "browserTarget": "attractiveness:build:development"
+            },
             "production": {
               "browserTarget": "attractiveness:build:production"
             }

+ 2 - 2
package.json

@@ -5,11 +5,11 @@
   "main": "build/index.html",
   "scripts": {
     "build": "ng build --configuration production",
-    "build-dev": "ng build",
+    "build-dev": "ng build --configuration development",
     "dev": "npm run start-dev",
     "serve": "npm run start-dev",
     "start": "npx http-server ./build -p 8080",
-    "start-dev": "ng serve --configuration production --disable-host-check",
+    "start-dev": "ng serve --disable-host-check",
     "test": "echo \"Error: no test specified\" && exit 1"
   },
   "repository": {