mirror of
https://github.com/labring/FastGPT.git
synced 2026-04-26 02:07:28 +08:00
V4.14.8 dev (#6517)
* doc * wip(next): upgrade next16 with next-rspack to build (#6501) * wip(next): upgrade next16 with next-rspack to build * wip: fix tsconfig path alias, bump various deps * fix: test action pnpm version, immer dep * fix: only use Rspack for develop environment * lock * fix: dataset choice hint (#6514) * fix: dataset choice hint * fix: regex replaceVarible remove useless match group * fix: type check (#6515) * test: perfect test cases for replaceVarible function in like case (#6516) --------- Co-authored-by: archer <545436317@qq.com> Co-authored-by: Ryo <whoeverimf5@gmail.com>
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import type { NextConfig } from 'next';
|
||||
import path from 'path';
|
||||
import withBundleAnalyzerInit from '@next/bundle-analyzer';
|
||||
import withRspack from 'next-rspack';
|
||||
|
||||
const withBundleAnalyzer = withBundleAnalyzerInit({
|
||||
enabled: process.env.ANALYZE === 'true'
|
||||
});
|
||||
const withBundleAnalyzer = withBundleAnalyzerInit({ enabled: process.env.ANALYZE === 'true' });
|
||||
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
|
||||
@@ -57,12 +58,21 @@ const nextConfig: NextConfig = {
|
||||
{
|
||||
module: /@scalar\/api-reference-react/,
|
||||
message: /autoprefixer/
|
||||
},
|
||||
{
|
||||
module: /any-promise[\\/]register\.js$/,
|
||||
message: /Critical dependency: the request of a dependency is an expression/
|
||||
},
|
||||
{
|
||||
module: /bullmq[\\/]dist[\\/](cjs|esm)[\\/]classes[\\/]child-processor\.js$/,
|
||||
message: /Critical dependency: the request of a dependency is an expression/
|
||||
}
|
||||
];
|
||||
|
||||
Object.assign(config.resolve!.alias, {
|
||||
'@mongodb-js/zstd': false,
|
||||
'@aws-sdk/credential-providers': false,
|
||||
'gcp-metadata': false,
|
||||
snappy: false,
|
||||
aws4: false,
|
||||
'mongodb-client-encryption': false,
|
||||
@@ -148,4 +158,8 @@ const nextConfig: NextConfig = {
|
||||
outputFileTracingRoot: path.join(__dirname, '../../')
|
||||
};
|
||||
|
||||
export default withBundleAnalyzer(nextConfig);
|
||||
const configWithPluginsExceptWithRspack = withBundleAnalyzer(nextConfig);
|
||||
|
||||
export default isDev
|
||||
? withRspack(configWithPluginsExceptWithRspack)
|
||||
: configWithPluginsExceptWithRspack;
|
||||
|
||||
Reference in New Issue
Block a user