fix(docker): 禁用Turbopack避免big.js序列化错误

This commit is contained in:
kennethcheng 2026-05-03 15:13:53 +08:00
parent 73909d9d6d
commit 16a1b05f6d
2 changed files with 8 additions and 4 deletions

View File

@ -12,7 +12,7 @@ COPY --from=deps /app/node_modules ./node_modules
COPY . . COPY . .
# 禁用 Next.js 遥测,并注入占位环境变量以通过编译 # 禁用 Next.js 遥测,并注入占位环境变量以通过编译
ENV NEXT_TELEMETRY_DISABLED=1 ENV NEXT_TELEMETRY_DISABLED=1
RUN npm run build RUN npm run build -- --no-turbopack
# 阶段 3生产运行环境 # 阶段 3生产运行环境
FROM node:20-alpine AS runner FROM node:20-alpine AS runner

View File

@ -10,10 +10,14 @@ const nextConfig: NextConfig = {
ignoreBuildErrors: true, ignoreBuildErrors: true,
}, },
experimental: {
turbo: {
resolveExtensions: ['.tsx', '.ts', '.jsx', '.js'],
},
},
allowedDevOrigins: [ allowedDevOrigins: [
'10.10.10.1', // 允许该IP访问 '10.10.10.1',
// 'your-custom-domain.dev', // 如果有自定义域名也可以加在这里
// '*.local-origin.dev' // 支持通配符
], ],
}; };