feat: update deploy

This commit is contained in:
chaos-zhu committed 2026-01-10 17:38:56 +08:00
1 parent 4617c639a7
commit fc1b9bf9f0
2 files changed
+11 -1

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "easyimg",
"installCommand": "pnpm install",
"buildCommand": "npm run generate",
"buildCommand": "pnpm run generate",
"assets": {
"directory": "./.output/public",
"notFoundStrategy": "singlePageApplication"
+10
View File
@@ -57,6 +57,16 @@ export default defineNuxtConfig({
'Access-Control-Allow-Headers': 'Content-Type, Authorization, X-API-Key'
}
}
},
// 预渲染完成后强制退出进程
// 这是为了解决某些模块(如数据库连接、定时器)可能保持进程活跃的问题
hooks: {
'prerender:done'() {
console.log('[Nitro] 预渲染完成,退出进程...')
setTimeout(() => {
process.exit(0)
}, 1000)
}
}
},