fix: milvus sdk (#3249)

This commit is contained in:
Archer
2024-11-27 10:06:12 +08:00
committed by GitHub
parent 4723a08d98
commit 5fa2e3c5ac
4 changed files with 10 additions and 9 deletions

View File

@@ -45,8 +45,6 @@ const nextConfig = {
}
if (isServer) {
// config.externals.push('@zilliz/milvus2-sdk-node');
if (nextRuntime === 'nodejs') {
const oldEntry = config.entry;
config = {
@@ -84,7 +82,12 @@ const nextConfig = {
transpilePackages: ['@fastgpt/*', 'ahooks'],
experimental: {
// 优化 Server Components 的构建和运行,避免不必要的客户端打包。
serverComponentsExternalPackages: ['mongoose', 'pg', '@node-rs/jieba', 'duck-duck-scrape'],
serverComponentsExternalPackages: [
'mongoose',
'pg',
'@node-rs/jieba',
'@zilliz/milvus2-sdk-node'
],
outputFileTracingRoot: path.join(__dirname, '../../'),
instrumentationHook: true
}