From 4eb2c9bd07316c56bd18e91e3c330250696b1352 Mon Sep 17 00:00:00 2001 From: RandyZhang <9149366+RandyZ@users.noreply.github.com> Date: Thu, 23 May 2024 09:11:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0Nextjs=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E6=9B=B4=E6=96=B0=E6=9C=8D=E5=8A=A1=E7=AB=AF=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E5=A3=B0=E6=98=8E=20(#1570)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: randy --- projects/app/next.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/app/next.config.js b/projects/app/next.config.js index 1a54fab54..a87dabb91 100644 --- a/projects/app/next.config.js +++ b/projects/app/next.config.js @@ -88,8 +88,8 @@ const nextConfig = { }, transpilePackages: ['@fastgpt/*', 'ahooks'], experimental: { - // 指定导出包优化,按需引入包模块 - optimizePackageImports: ['mongoose', 'pg'], + // 优化 Server Components 的构建和运行,避免不必要的客户端打包。 + serverComponentsExternalPackages: ['mongoose', 'pg'], outputFileTracingRoot: path.join(__dirname, '../../') } };