修改了 run.sh:25-33 的 prepare_standalone() 函数,现在会复制整个 .next 目录内容到 standalone 目录
This commit is contained in:
3
run.sh
3
run.sh
@@ -26,7 +26,8 @@ prepare_standalone() {
|
||||
if [ -f ".next/standalone/server.js" ]; then
|
||||
rm -rf .next/standalone/.next .next/standalone/public
|
||||
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/
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user