From 578426488e7b2da2b887d2a864f0d6c23a4838dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E9=98=B3?= Date: Wed, 3 Dec 2025 21:58:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E3=80=82Gitignore=E5=92=8Cne?= =?UTF-8?q?xt.js=E9=85=8D=E7=BD=AE=E8=87=AA=E5=AE=9A=E4=B9=89=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E8=BE=93=E5=87=BA=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在next.config.mjs中将build输出目录改为next -更新。Gitignore以反映新的输出目录 —调整了tsconfig。Json包含next/types*。为更好的类型支持 --- .gitignore | 2 +- next.config.mjs | 2 ++ tsconfig.json | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 885d213..05c2bee 100755 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ /coverage # next.js -/.next/ +/next/ /out/ # production diff --git a/next.config.mjs b/next.config.mjs index 35313ea..4a1f1d8 100755 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,5 +1,7 @@ /** @type {import('next').NextConfig} */ const nextConfig = { + // 自定义构建输出目录 + distDir: 'next', // 关闭严格模式 reactStrictMode: false, // 配置图片来源 diff --git a/tsconfig.json b/tsconfig.json index f48e7ee..afe1f10 100755 --- a/tsconfig.json +++ b/tsconfig.json @@ -29,9 +29,10 @@ "target": "ES2017" }, "include": [ - "next-env.d.ts", "**/*.ts", "**/*.tsx", + "next-env.d.ts", + "next/types/**/*.ts", ".next/types/**/*.ts" ], "exclude": [