fix: resolve production runtime issues
This commit is contained in:
@@ -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()]
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user