1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-05-29 22:37:44 +02:00

fix(footer): show 0.0.0-development version in Footer in development

This commit is contained in:
2024-04-06 20:40:25 +02:00
parent cd5e92b64a
commit 0eb780485c
2 changed files with 11 additions and 2 deletions

8
utils/getVersion.ts Normal file
View File

@ -0,0 +1,8 @@
export const getVersion = async (): Promise<string> => {
if (process.env.NODE_ENV === "development") {
return "0.0.0-development"
}
const { readPackage } = await import("read-pkg")
const { version } = await readPackage()
return version
}