From 31245e1f3374934e9d8b97b79b55113da27c4340 Mon Sep 17 00:00:00 2001 From: 537yaha <2930134478@qq.com> Date: Tue, 3 Feb 2026 14:12:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E8=A3=85=20typescript=20=E4=BB=A5?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=20next.config.ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 3e0341c..1431c26 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -38,8 +38,8 @@ ENV NODE_ENV=production # 复制 package 文件(用于安装生产依赖) COPY package*.json ./ -# 只安装生产依赖 -RUN npm ci --only=production && npm cache clean --force +# 只安装生产依赖;并安装 TypeScript 供 next start 加载 next.config.ts(运行时不再尝试 npm install) +RUN npm ci --only=production && npm install typescript --no-save && npm cache clean --force # 从构建阶段复制必要的文件 COPY --from=builder /app/next.config.ts ./