Skip to content

Commit

Permalink
Fix #169: Re-enable "dev" mode on Android.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkem committed Dec 10, 2023
1 parent 9b787a2 commit a27485d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
13 changes: 11 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -158,8 +163,12 @@
"configurations": {
"production": {
"browserTarget": "app:build:production"
},
"development": {
"browserTarget": "app:build:development"
}
}
},
"defaultConfiguration": "development"
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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 => {
Expand Down

0 comments on commit a27485d

Please sign in to comment.