From 2a4e7bbffe90d1117c9ab5ae96ee39a6823f4d1b Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Sat, 14 Mar 2026 00:21:35 -0700 Subject: [PATCH] Fix: Force svg-captcha external via webpack config --- next.config.mjs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index f6b843e..7b72e0f 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,8 +1,13 @@ /** @type {import('next').NextConfig} */ const nextConfig = { output: 'standalone', - // This prevents Webpack from bundling svg-captcha and breaking its font paths - serverExternalPackages: ['svg-captcha'], + webpack: (config, { isServer }) => { + // Force Webpack to leave svg-captcha completely alone on the server + if (isServer) { + config.externals.push('svg-captcha'); + } + return config; + }, }; export default nextConfig;