mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-21 11:43:56 +00:00
41 lines
855 B
JavaScript
41 lines
855 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
const { i18n } = require('./next-i18next.config');
|
|
const path = require('path');
|
|
|
|
const nextConfig = {
|
|
i18n,
|
|
output: 'standalone',
|
|
reactStrictMode: false,
|
|
compress: true,
|
|
transpilePackages: ['@fastgpt/*'],
|
|
webpack(config, { isServer }) {
|
|
if (!isServer) {
|
|
config.resolve = {
|
|
...config.resolve,
|
|
fallback: {
|
|
...config.resolve.fallback,
|
|
fs: false
|
|
}
|
|
};
|
|
}
|
|
config.module = {
|
|
...config.module,
|
|
rules: config.module.rules.concat([
|
|
{
|
|
test: /\.svg$/i,
|
|
issuer: /\.[jt]sx?$/,
|
|
use: ['@svgr/webpack']
|
|
}
|
|
]),
|
|
exprContextCritical: false
|
|
};
|
|
|
|
return config;
|
|
},
|
|
experimental: {
|
|
outputFileTracingRoot: path.join(__dirname, '../../')
|
|
}
|
|
};
|
|
|
|
module.exports = nextConfig;
|