mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
16 lines
406 B
TypeScript
16 lines
406 B
TypeScript
import packageJson from '../../package.json';
|
|
|
|
const resolveCurrentAppVersion = (): string => {
|
|
const configuredVersion = import.meta.env.VITE_APP_VERSION;
|
|
|
|
if (typeof configuredVersion === 'string' && configuredVersion.trim().length > 0) {
|
|
return configuredVersion.trim();
|
|
}
|
|
|
|
return packageJson.version;
|
|
};
|
|
|
|
const currentAppVersion = resolveCurrentAppVersion();
|
|
|
|
export { currentAppVersion };
|