From 16a1b05f6d69ac608b0cb1562ce40006266bff64 Mon Sep 17 00:00:00 2001 From: kennethcheng Date: Sun, 3 May 2026 15:13:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(docker):=20=E7=A6=81=E7=94=A8Turbopack?= =?UTF-8?q?=E9=81=BF=E5=85=8Dbig.js=E5=BA=8F=E5=88=97=E5=8C=96=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- next.config.ts | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 84b6df3..4fa6676 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ COPY --from=deps /app/node_modules ./node_modules COPY . . # 禁用 Next.js 遥测,并注入占位环境变量以通过编译 ENV NEXT_TELEMETRY_DISABLED=1 -RUN npm run build +RUN npm run build -- --no-turbopack # 阶段 3:生产运行环境 FROM node:20-alpine AS runner diff --git a/next.config.ts b/next.config.ts index 0ae7d0f..3270180 100644 --- a/next.config.ts +++ b/next.config.ts @@ -10,10 +10,14 @@ const nextConfig: NextConfig = { ignoreBuildErrors: true, }, + experimental: { + turbo: { + resolveExtensions: ['.tsx', '.ts', '.jsx', '.js'], + }, + }, + allowedDevOrigins: [ - '10.10.10.1', // 允许该IP访问 - // 'your-custom-domain.dev', // 如果有自定义域名也可以加在这里 - // '*.local-origin.dev' // 支持通配符 + '10.10.10.1', ], };