We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3555f3 commit 3ffec8cCopy full SHA for 3ffec8c
deploy.sh
@@ -22,8 +22,10 @@ echo "📦 构建前端到临时目录..."
22
cp -r $BASE_DIR $TMP_DIR/frontend
23
cd $TMP_DIR/frontend
24
npm install --force
25
-# 清理 Next.js 缓存
+# 清理 Next.js 缓存和构建产物
26
+echo "🗑️ 清理缓存..."
27
rm -rf .next
28
+rm -rf node_modules/.cache
29
npm run build
30
31
echo "🚀 同步前端到生产目录..."
next.config.ts
@@ -82,7 +82,7 @@ const nextConfig: NextConfig = {
82
headers: [
83
{
84
key: 'Cache-Control',
85
- value: 'public, max-age=86400'
+ value: 'public, max-age=3600, must-revalidate'
86
}
87
]
88
0 commit comments