fix(deploy): use production deps for serwist runtime
This commit is contained in:
+1
-11
@@ -9,7 +9,7 @@ import { withSerwist } from "@serwist/turbopack";
|
||||
*
|
||||
* 容器化部署模型:`output: "standalone"` + Docker Compose。
|
||||
* - `pnpm build` 产出 .next/standalone、.next/static、public。
|
||||
* - Dockerfile 运行 `node server.js`,不再依赖 `next start` 和完整 node_modules。
|
||||
* - Dockerfile 运行 `node server.js`,并保留生产依赖以支持 Serwist 运行时生成 SW。
|
||||
*/
|
||||
const nextConfig: NextConfig = {
|
||||
output: "standalone",
|
||||
@@ -17,16 +17,6 @@ const nextConfig: NextConfig = {
|
||||
// 关闭静态优化以规避 16.2.7 global-error prerender bug
|
||||
staticGenerationRetryCount: 0,
|
||||
},
|
||||
outputFileTracingIncludes: {
|
||||
"/serwist/*": [
|
||||
"./src/app/sw.ts",
|
||||
"./node_modules/.pnpm/@serwist+*/node_modules/@serwist/**/*",
|
||||
"./node_modules/.pnpm/idb@*/node_modules/idb/**/*",
|
||||
"./node_modules/.pnpm/serwist@*/node_modules/serwist/**/*",
|
||||
"./node_modules/.pnpm/esbuild@*/node_modules/esbuild/**/*",
|
||||
"./node_modules/.pnpm/@esbuild+linux-*@*/node_modules/@esbuild/linux-*/**/*",
|
||||
],
|
||||
},
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user