mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-23 14:10:18 +09:00
update next.config.mjs
This commit is contained in:
parent
7391275fb3
commit
e41b2d91b6
@ -8,6 +8,10 @@ console.log("[Next] build with chunk: ", !disableChunk);
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
env: {
|
||||
LANGCHAIN_CALLBACKS_BACKGROUND: true,
|
||||
},
|
||||
|
||||
webpack(config) {
|
||||
config.module.rules.push({
|
||||
test: /\.svg$/,
|
||||
@ -16,20 +20,14 @@ const nextConfig = {
|
||||
|
||||
if (disableChunk) {
|
||||
config.plugins.push(
|
||||
new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 }),
|
||||
new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 })
|
||||
);
|
||||
}
|
||||
|
||||
config.resolve.fallback = {
|
||||
child_process: false,
|
||||
};
|
||||
|
||||
config.plugins.push(
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NEXT_PUBLIC_LANGCHAIN_CALLBACKS_BACKGROUND': true
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
return config;
|
||||
},
|
||||
output: mode,
|
||||
@ -77,8 +75,10 @@ if (mode !== "export") {
|
||||
},
|
||||
{
|
||||
// https://{resource_name}.openai.azure.com/openai/deployments/{deploy_name}/chat/completions
|
||||
source: "/api/proxy/azure/:resource_name/deployments/:deploy_name/:path*",
|
||||
destination: "https://:resource_name.openai.azure.com/openai/deployments/:deploy_name/:path*",
|
||||
source:
|
||||
"/api/proxy/azure/:resource_name/deployments/:deploy_name/:path*",
|
||||
destination:
|
||||
"https://:resource_name.openai.azure.com/openai/deployments/:deploy_name/:path*",
|
||||
},
|
||||
{
|
||||
source: "/api/proxy/google/:path*",
|
||||
@ -108,4 +108,4 @@ if (mode !== "export") {
|
||||
};
|
||||
}
|
||||
|
||||
export default nextConfig;
|
||||
export default nextConfig;
|
||||
|
Loading…
Reference in New Issue
Block a user