diff --git a/Makefile b/Makefile index bb9666dac..74c0fcf7b 100644 --- a/Makefile +++ b/Makefile @@ -64,6 +64,10 @@ build-frontend-prod: dep-frontend build-frontend-desktop: dep-frontend cd frontend && yarn build -- -c desktop_sandbox +.PHONY: build-frontend-desktop-prod +build-frontend-desktop-prod: dep-frontend + cd frontend && yarn build -- -c desktop_prod + .PHONY: test-frontend # reduce logging, disable angular-cli analytics for ci environment diff --git a/frontend/angular.json b/frontend/angular.json index 6a78b7a16..308e6c003 100644 --- a/frontend/angular.json +++ b/frontend/angular.json @@ -153,6 +153,33 @@ "maximumError": "10kb" } ] + }, + "desktop_prod": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.desktop_prod.ts" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": true, + "namedChunks": false, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "budgets": [ + { + "type": "initial", + "maximumWarning": "2mb", + "maximumError": "10mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "6kb", + "maximumError": "10kb" + } + ] } } }, @@ -173,6 +200,9 @@ }, "desktop_sandbox": { "browserTarget": "fastenhealth:build:desktop_sandbox" + }, + "desktop_prod": { + "browserTarget": "fastenhealth:build:desktop_prod" } } }, diff --git a/frontend/src/environments/environment.desktop_prod.ts b/frontend/src/environments/environment.desktop_prod.ts new file mode 100644 index 000000000..76f8ae376 --- /dev/null +++ b/frontend/src/environments/environment.desktop_prod.ts @@ -0,0 +1,12 @@ +export const environment = { + production: true, + environment_cloud: false, + environment_desktop: true, + environment_name: "desktop_prod", + + lighthouse_api_endpoint_base: 'https://lighthouse.fastenhealth.com/v1', + + + //used to specify the api server that we're going to use (can be relative or absolute). Must not have trailing slash + fasten_api_endpoint_base: '/api', +};