From 76ef70dff4132e4c8c360336f807821fa997b643 Mon Sep 17 00:00:00 2001 From: Hk-Gosuto Date: Tue, 27 Aug 2024 23:55:43 +0800 Subject: [PATCH] update next.config.mjs --- next.config.mjs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index 3fd18c7c3..54a31c669 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -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, };