This is an automated email from the ASF dual-hosted git repository. riemer pushed a commit to branch dev in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
commit ec1cc1614512cc179f0e99244de1b95beeb80206 Author: Dominik Riemer <[email protected]> AuthorDate: Mon Sep 7 23:03:57 2020 +0200 [hotfix] Add angular environment config --- ui/angular.json | 13 +++++++++++-- ui/src/main.ts | 11 +++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/ui/angular.json b/ui/angular.json index 55b4477..556f339 100644 --- a/ui/angular.json +++ b/ui/angular.json @@ -17,7 +17,10 @@ "main": "src/main.ts", "tsConfig": "src/tsconfig.app.json", "polyfills": "src/polyfills.ts", - "allowedCommonJsDependencies": ["lodash", "codemirror"], + "allowedCommonJsDependencies": [ + "lodash", + "codemirror" + ], "assets": [ "src/assets", { @@ -42,6 +45,12 @@ }, "configurations": { "production": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ], "budgets": [ { "type": "anyComponentStyle", @@ -93,7 +102,7 @@ "src/assets" ], "scripts": [ - ] + ] } }, "lint": { diff --git a/ui/src/main.ts b/ui/src/main.ts index 1feb465..1c1d563 100644 --- a/ui/src/main.ts +++ b/ui/src/main.ts @@ -17,14 +17,13 @@ */ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - +import { environment } from './environments/environment'; import { AppModule } from './app/appng5.module'; +import { enableProdMode } from "@angular/core"; -// platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => { -// const url: UrlService = platformRef.injector.get(UrlService); -// url.listen(); -// url.sync(); -// }); +if (environment.production) { + enableProdMode(); +} platformBrowserDynamic().bootstrapModule(AppModule) .catch(err => console.error(err)); \ No newline at end of file
