From 7391275fb3b4912585b9099cb7b2e39600a3f779 Mon Sep 17 00:00:00 2001 From: Hk-Gosuto Date: Wed, 28 Aug 2024 00:24:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20next.config.mjs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- next.config.mjs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index 2cc3c5937..e965a1807 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -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,