mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-24 22:50:22 +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} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
|
env: {
|
||||||
|
LANGCHAIN_CALLBACKS_BACKGROUND: true,
|
||||||
|
},
|
||||||
|
|
||||||
webpack(config) {
|
webpack(config) {
|
||||||
config.module.rules.push({
|
config.module.rules.push({
|
||||||
test: /\.svg$/,
|
test: /\.svg$/,
|
||||||
@ -16,20 +20,14 @@ const nextConfig = {
|
|||||||
|
|
||||||
if (disableChunk) {
|
if (disableChunk) {
|
||||||
config.plugins.push(
|
config.plugins.push(
|
||||||
new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 }),
|
new webpack.optimize.LimitChunkCountPlugin({ maxChunks: 1 })
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
config.resolve.fallback = {
|
config.resolve.fallback = {
|
||||||
child_process: false,
|
child_process: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
config.plugins.push(
|
|
||||||
new webpack.DefinePlugin({
|
|
||||||
'process.env.NEXT_PUBLIC_LANGCHAIN_CALLBACKS_BACKGROUND': true
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
},
|
},
|
||||||
output: mode,
|
output: mode,
|
||||||
@ -77,8 +75,10 @@ if (mode !== "export") {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
// https://{resource_name}.openai.azure.com/openai/deployments/{deploy_name}/chat/completions
|
// https://{resource_name}.openai.azure.com/openai/deployments/{deploy_name}/chat/completions
|
||||||
source: "/api/proxy/azure/:resource_name/deployments/:deploy_name/:path*",
|
source:
|
||||||
destination: "https://:resource_name.openai.azure.com/openai/deployments/:deploy_name/:path*",
|
"/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*",
|
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