修改了 run.sh:25-33 的 prepare_standalone() 函数,现在会复制整个 .next 目录内容到 standalone 目录
Some checks failed
CI / lint (push) Has been cancelled
CI / build (push) Has been cancelled

This commit is contained in:
2026-02-27 13:43:01 +08:00
parent c31cc840d7
commit 4e8cf9dcbb

3
run.sh
View File

@@ -26,7 +26,8 @@ prepare_standalone() {
if [ -f ".next/standalone/server.js" ]; then if [ -f ".next/standalone/server.js" ]; then
rm -rf .next/standalone/.next .next/standalone/public rm -rf .next/standalone/.next .next/standalone/public
mkdir -p .next/standalone/.next mkdir -p .next/standalone/.next
[ -d .next/static ] && cp -r .next/static .next/standalone/.next/ # 复制完整的 .next 目录内容standalone 服务器需要所有文件)
[ -d .next ] && cp -r .next/* .next/standalone/.next/
[ -d public ] && cp -r public .next/standalone/ [ -d public ] && cp -r public .next/standalone/
fi fi
} }