fix: vercel 504 error
This commit is contained in:
parent
7a64266b9c
commit
c64179950d
|
@ -6,8 +6,6 @@ console.log("[Next] build mode", mode);
|
||||||
const disableChunk = !!process.env.DISABLE_CHUNK || mode === "export";
|
const disableChunk = !!process.env.DISABLE_CHUNK || mode === "export";
|
||||||
console.log("[Next] build with chunk: ", !disableChunk);
|
console.log("[Next] build with chunk: ", !disableChunk);
|
||||||
|
|
||||||
process.env.LANGCHAIN_CALLBACKS_BACKGROUND = true;
|
|
||||||
|
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
webpack(config) {
|
webpack(config) {
|
||||||
|
@ -22,6 +20,12 @@ const nextConfig = {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config.plugins.push(
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env.LANGCHAIN_CALLBACKS_BACKGROUND': JSON.stringify('true'),
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
config.resolve.fallback = {
|
config.resolve.fallback = {
|
||||||
child_process: false,
|
child_process: false,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue