From 5fed561471a2e5c39ce7c47296390cfa8f8e37a8 Mon Sep 17 00:00:00 2001 From: archer <545436317@qq.com> Date: Wed, 9 Aug 2023 11:05:41 +0800 Subject: [PATCH] fix: i18n next --- client/next.config.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/client/next.config.js b/client/next.config.js index e07124107..8a8972e3f 100644 --- a/client/next.config.js +++ b/client/next.config.js @@ -21,13 +21,17 @@ const nextConfig = { asyncWebAssembly: true, layers: true }; - config.module.rules = config.module.rules.concat([ - { - test: /\.svg$/i, - issuer: /\.[jt]sx?$/, - use: ['@svgr/webpack'] - } - ]); + config.module = { + ...config.module, + rules: config.module.rules.concat([ + { + test: /\.svg$/i, + issuer: /\.[jt]sx?$/, + use: ['@svgr/webpack'] + } + ]), + exprContextCritical: false + }; return config; }