diff --git a/angular.json b/angular.json index 80cfcf50..99ecb6c8 100644 --- a/angular.json +++ b/angular.json @@ -147,8 +147,13 @@ "production": { "cordovaBuildTarget": "app:ionic-cordova-build:production", "devServerTarget": "app:serve:production" + }, + "development": { + "cordovaBuildTarget": "app:ionic-cordova-build:development", + "browserTarget": "app:server:development" } - } + }, + "defaultConfiguration": "development" }, "ionic-cordova-build": { "builder": "@ionic/cordova-builders:cordova-build", @@ -158,8 +163,12 @@ "configurations": { "production": { "browserTarget": "app:build:production" + }, + "development": { + "browserTarget": "app:build:development" } - } + }, + "defaultConfiguration": "development" } } } diff --git a/src/app/app.component.ts b/src/app/app.component.ts index e0c463e8..2da7fc33 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,4 +1,4 @@ -import { AfterViewInit, Component, Inject, OnInit, OnDestroy } from '@angular/core'; +import { AfterViewInit, Component, Inject, OnInit, OnDestroy, isDevMode } from '@angular/core'; import { SwUpdate } from '@angular/service-worker'; @@ -57,7 +57,8 @@ export class AppComponent implements AfterViewInit, OnInit, OnDestroy { if (versionCode) { version += " (" + versionCode + ")"; } - this.logger.info("Open Lap", version, "running on", window?.navigator?.userAgent); + this.logger.info("Open Lap", version, isDevMode() ? "[dev]" : "[prod]", "on", window?.navigator?.userAgent); + isDevMode }); }); this.settings.getOptions().subscribe(options => {