update package;fix: input data model ui (#4181)
* update package * fix: ts * update config * update jieba package * add type sign * fix: input data ui
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const { i18n } = require('./next-i18next.config');
|
||||
const { i18n } = require('./next-i18next.config.js');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
@@ -30,10 +30,6 @@ const nextConfig = {
|
||||
test: /\.svg$/i,
|
||||
issuer: /\.[jt]sx?$/,
|
||||
use: ['@svgr/webpack']
|
||||
},
|
||||
{
|
||||
test: /\.node$/,
|
||||
use: [{ loader: 'nextjs-node-loader' }]
|
||||
}
|
||||
]),
|
||||
exprContextCritical: false,
|
||||
@@ -43,6 +39,7 @@ const nextConfig = {
|
||||
if (!config.externals) {
|
||||
config.externals = [];
|
||||
}
|
||||
config.externals.push('@node-rs/jieba');
|
||||
|
||||
if (isServer) {
|
||||
if (nextRuntime === 'nodejs') {
|
||||
@@ -79,14 +76,15 @@ const nextConfig = {
|
||||
|
||||
return config;
|
||||
},
|
||||
transpilePackages: ['@fastgpt/*', 'ahooks'],
|
||||
// 需要转译的包
|
||||
transpilePackages: ['@fastgpt/global', '@fastgpt/web', 'ahooks'],
|
||||
experimental: {
|
||||
// 优化 Server Components 的构建和运行,避免不必要的客户端打包。
|
||||
serverComponentsExternalPackages: [
|
||||
'mongoose',
|
||||
'pg',
|
||||
'@node-rs/jieba',
|
||||
'@zilliz/milvus2-sdk-node'
|
||||
'@zilliz/milvus2-sdk-node',
|
||||
"tiktoken"
|
||||
],
|
||||
outputFileTracingRoot: path.join(__dirname, '../../'),
|
||||
instrumentationHook: true
|
||||
|
||||
Reference in New Issue
Block a user