Add package.json name and version as defines to avoid importing the package.json in code
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import Package from '../../package.json';
|
||||
import appSettings from '../scripts/settings/appSettings';
|
||||
import browser from '../scripts/browser';
|
||||
import Events from '../utils/events.ts';
|
||||
@@ -36,7 +35,7 @@ function getDeviceProfile(item) {
|
||||
let profile;
|
||||
|
||||
if (window.NativeShell) {
|
||||
profile = window.NativeShell.AppHost.getDeviceProfile(profileBuilder, Package.version);
|
||||
profile = window.NativeShell.AppHost.getDeviceProfile(profileBuilder, __PACKAGE_JSON_VERSION__);
|
||||
} else {
|
||||
const builderOpts = getBaseProfileOptions(item);
|
||||
profile = profileBuilder(builderOpts);
|
||||
@@ -378,7 +377,7 @@ export const appHost = {
|
||||
},
|
||||
appVersion: function () {
|
||||
return window.NativeShell?.AppHost?.appVersion ?
|
||||
window.NativeShell.AppHost.appVersion() : Package.version;
|
||||
window.NativeShell.AppHost.appVersion() : __PACKAGE_JSON_VERSION__;
|
||||
},
|
||||
getPushTokenInfo: function () {
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user