From c2909756224438dc9338b4df75c0235e112c6e0d Mon Sep 17 00:00:00 2001 From: Bilal Shaikh Date: Sun, 16 Jan 2022 15:40:53 -0500 Subject: [PATCH] build: disable production build optimization for NestJS disabled optimization in prod builds as this uses minification, which causes class names to change. NestJS heavilty utilizes reflection for many features which break when this change occurs. see nrwl/nx#8446 closes #4061 closes #4036 --- apps/api/project.json | 30 ++++++++++++++++++++++-------- apps/dispatch-service/project.json | 22 ++++++++++++++++------ apps/mail-service/project.json | 26 +++++++++++++++++++------- apps/simulators-api/project.json | 26 +++++++++++++++++++------- 4 files changed, 76 insertions(+), 28 deletions(-) diff --git a/apps/api/project.json b/apps/api/project.json index e8697548cf..04e165b7ed 100644 --- a/apps/api/project.json +++ b/apps/api/project.json @@ -11,11 +11,13 @@ "outputPath": "dist/apps/api", "main": "apps/api/src/main.ts", "tsConfig": "apps/api/tsconfig.app.json", - "assets": ["apps/api/src/assets"] + "assets": [ + "apps/api/src/assets" + ] }, "configurations": { "production": { - "optimization": true, + "optimization": false, "extractLicenses": true, "inspect": false, "fileReplacements": [ @@ -38,7 +40,9 @@ "lint": { "executor": "@nrwl/linter:eslint", "options": { - "lintFilePatterns": ["apps/api/**/*.ts"] + "lintFilePatterns": [ + "apps/api/**/*.ts" + ] } }, "test": { @@ -53,7 +57,9 @@ "options": { "file": "./Dockerfile", "push": true, - "build-args": ["app=api"], + "build-args": [ + "app=api" + ], "cache-from": [ "type=registry,ref=ghcr.io/biosimulations/api:buildcache" ], @@ -62,7 +68,9 @@ ], "metadata": { "enabled": true, - "images": ["ghcr.io/biosimulations/api"], + "images": [ + "ghcr.io/biosimulations/api" + ], "labels": [ "org.opencontainers.image.title=BioSimulations API", "org.opencontainers.image.description=Docker image for the BioSimulations API", @@ -85,6 +93,12 @@ } } }, - "tags": ["scope:dispatch", "type:api", "platform:server"], - "implicitDependencies": ["hdf5-api-client"] -} + "tags": [ + "scope:dispatch", + "type:api", + "platform:server" + ], + "implicitDependencies": [ + "hdf5-api-client" + ] +} \ No newline at end of file diff --git a/apps/dispatch-service/project.json b/apps/dispatch-service/project.json index 2c9d636726..558cb1414a 100644 --- a/apps/dispatch-service/project.json +++ b/apps/dispatch-service/project.json @@ -11,11 +11,13 @@ "outputPath": "dist/apps/dispatch-service", "main": "apps/dispatch-service/src/main.ts", "tsConfig": "apps/dispatch-service/tsconfig.app.json", - "assets": ["apps/dispatch-service/src/assets"] + "assets": [ + "apps/dispatch-service/src/assets" + ] }, "configurations": { "production": { - "optimization": true, + "optimization": false, "extractLicenses": true, "inspect": false, "fileReplacements": [ @@ -38,7 +40,9 @@ "lint": { "executor": "@nrwl/linter:eslint", "options": { - "lintFilePatterns": ["apps/dispatch-service/**/*.ts"] + "lintFilePatterns": [ + "apps/dispatch-service/**/*.ts" + ] } }, "test": { @@ -53,7 +57,9 @@ "options": { "file": "./Dockerfile", "push": true, - "build-args": ["app=dispatch-service"], + "build-args": [ + "app=dispatch-service" + ], "cache-from": [ "type=registry,ref=ghcr.io/biosimulations/simulation-service:buildcache" ], @@ -88,6 +94,10 @@ } } }, - "tags": ["scope:dispatch", "type:service", "platform:server"], + "tags": [ + "scope:dispatch", + "type:service", + "platform:server" + ], "implicitDependencies": [] -} +} \ No newline at end of file diff --git a/apps/mail-service/project.json b/apps/mail-service/project.json index c5dded7c92..f0b0247428 100644 --- a/apps/mail-service/project.json +++ b/apps/mail-service/project.json @@ -11,11 +11,13 @@ "outputPath": "dist/apps/mail-service", "main": "apps/mail-service/src/main.ts", "tsConfig": "apps/mail-service/tsconfig.app.json", - "assets": ["apps/mail-service/src/assets"] + "assets": [ + "apps/mail-service/src/assets" + ] }, "configurations": { "production": { - "optimization": true, + "optimization": false, "extractLicenses": true, "inspect": false, "fileReplacements": [ @@ -36,7 +38,9 @@ "lint": { "executor": "@nrwl/linter:eslint", "options": { - "lintFilePatterns": ["apps/mail-service/**/*.ts"] + "lintFilePatterns": [ + "apps/mail-service/**/*.ts" + ] } }, "test": { @@ -51,7 +55,9 @@ "options": { "file": "./Dockerfile", "push": true, - "build-args": ["app=mail-service"], + "build-args": [ + "app=mail-service" + ], "cache-from": [ "type=registry,ref=ghcr.io/biosimulations/mail-service:buildcache" ], @@ -60,7 +66,9 @@ ], "metadata": { "enabled": true, - "images": ["ghcr.io/biosimulations/mail-service"], + "images": [ + "ghcr.io/biosimulations/mail-service" + ], "labels": [ "org.opencontainers.image.title=BioSimulations Mail Service", "org.opencontainers.image.description=Docker image for the BioSimulations Mail Service", @@ -83,5 +91,9 @@ } } }, - "tags": ["scope:mail", "type:service", "platform:server"] -} + "tags": [ + "scope:mail", + "type:service", + "platform:server" + ] +} \ No newline at end of file diff --git a/apps/simulators-api/project.json b/apps/simulators-api/project.json index 88b49c4c98..5815f7b4ba 100644 --- a/apps/simulators-api/project.json +++ b/apps/simulators-api/project.json @@ -11,11 +11,13 @@ "outputPath": "dist/apps/simulators-api", "main": "apps/simulators-api/src/main.ts", "tsConfig": "apps/simulators-api/tsconfig.app.json", - "assets": ["apps/simulators-api/src/assets"] + "assets": [ + "apps/simulators-api/src/assets" + ] }, "configurations": { "production": { - "optimization": true, + "optimization": false, "extractLicenses": true, "inspect": false, "fileReplacements": [ @@ -36,7 +38,9 @@ "lint": { "executor": "@nrwl/linter:eslint", "options": { - "lintFilePatterns": ["apps/simulators-api/**/*.ts"] + "lintFilePatterns": [ + "apps/simulators-api/**/*.ts" + ] } }, "test": { @@ -51,7 +55,9 @@ "options": { "file": "./Dockerfile", "push": true, - "build-args": ["app=simulators-api"], + "build-args": [ + "app=simulators-api" + ], "cache-from": [ "type=registry,ref=ghcr.io/biosimulations/simulators-api:buildcache" ], @@ -60,7 +66,9 @@ ], "metadata": { "enabled": true, - "images": ["ghcr.io/biosimulations/simulators-api"], + "images": [ + "ghcr.io/biosimulations/simulators-api" + ], "tags": [ "type=schedule", "type=ref,event=branch", @@ -83,5 +91,9 @@ } } }, - "tags": ["scope:simulators", "type:api", "platform:server"] -} + "tags": [ + "scope:simulators", + "type:api", + "platform:server" + ] +} \ No newline at end of file