fix: resolve production runtime issues

This commit is contained in:
2026-03-17 13:50:13 +01:00
parent 5184e26293
commit 8886e8b7df
5 changed files with 248 additions and 11 deletions

View File

@@ -4,12 +4,12 @@ import tailwindcss from "@tailwindcss/vite"
const getRepoVersion = () => {
try {
const tags = execSync(
"git for-each-ref --sort=-version:refname --format='%(refname:short)' refs/tags",
{ encoding: "utf8" }
"git for-each-ref --sort=-version:refname --format='%(refname:short)' refs/tags",
{ encoding: "utf8" }
)
.split("\n")
.map((tag) => tag.trim())
.filter(Boolean)
.split("\n")
.map((tag) => tag.trim())
.filter(Boolean)
return tags[0] || "dev"
} catch {
@@ -37,10 +37,11 @@ export default defineNuxtConfig({
runtimeConfig: {
apiSecretKey: process.env.API_SECRET_KEY,
public: {
appVersion: getRepoVersion()
appVersion: getRepoVersion(),
apiKey: process.env.API_SECRET_KEY
}
},
vite: {
plugins: [tailwindcss()]
}
})
})