update next.config.mjs

This commit is contained in:
Hk-Gosuto 2024-08-27 23:55:43 +08:00
parent 81f8556f8a
commit 76ef70dff4
1 changed files with 3 additions and 6 deletions

View File

@ -8,6 +8,9 @@ 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$/,
@ -20,12 +23,6 @@ const nextConfig = {
);
}
config.plugins.push(
new webpack.DefinePlugin({
'process.env.LANGCHAIN_CALLBACKS_BACKGROUND': JSON.stringify('true'),
})
);
config.resolve.fallback = {
child_process: false,
};