更新 next.config.mjs

This commit is contained in:
Hk-Gosuto 2024-08-28 00:24:11 +08:00
parent a458a17076
commit 7391275fb3

View File

@ -8,9 +8,6 @@ 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$/,
@ -26,7 +23,13 @@ const nextConfig = {
config.resolve.fallback = {
child_process: false,
};
config.plugins.push(
new webpack.DefinePlugin({
'process.env.NEXT_PUBLIC_LANGCHAIN_CALLBACKS_BACKGROUND': true
})
);
return config;
},
output: mode,