mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-12-10 23:42:37 +01:00
fix(footer): show 0.0.0-development version in Footer in development
This commit is contained in:
8
utils/getVersion.ts
Normal file
8
utils/getVersion.ts
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user