You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2020/09/09 20:07:01 UTC
[incubator-streampipes] branch rel/0.67.0 updated: [hotfix] Add
angular environment config
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch rel/0.67.0
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
The following commit(s) were added to refs/heads/rel/0.67.0 by this push:
new 5e5a066 [hotfix] Add angular environment config
5e5a066 is described below
commit 5e5a0666901e95a62c9ca90e0c81fe463c91da48
Author: Dominik Riemer <ri...@fzi.de>
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