diff --git a/angular.json b/angular.json index 3f84bc0..467bf25 100644 --- a/angular.json +++ b/angular.json @@ -42,6 +42,48 @@ ] }, "configurations": { + "electron": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.electron.ts" + } + ], + "budgets": [ + { + "type": "initial", + "maximumWarning": "3mb", + "maximumError": "3mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, + "production": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ], + "budgets": [ + { + "type": "initial", + "maximumWarning": "3mb", + "maximumError": "3mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, "production": { "fileReplacements": [ { diff --git a/package.json b/package.json index 75bf40d..e752d1d 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "start": "ng serve --proxy-config proxy.config.local.json ", "start:prod": "ng serve --proxy-config proxy.config.prod.json ", "build": "ng build --configuration=production && gzipper compress --gzip --brotli ./dist/public-pool-ui/", + "build:electron": "ng build --configuration=electron --base-href ./", "build:github": "ng build --configuration=production && echo \"web.public-pool.io\" > dist/public-pool-ui/CNAME", "watch": "ng build --watch --configuration development", "test": "ng test", diff --git a/src/environments/environment.electron.ts b/src/environments/environment.electron.ts new file mode 100644 index 0000000..75d357e --- /dev/null +++ b/src/environments/environment.electron.ts @@ -0,0 +1,5 @@ +export const environment = { + production: true, + API_URL: 'http://localhost:3334', + STRATUM_URL: 'localhost:3333' +};