Fix: Force svg-captcha external via webpack config

This commit is contained in:
2026-03-14 00:21:35 -07:00
parent 49632b9ae6
commit 2a4e7bbffe

View File

@@ -1,8 +1,13 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
output: 'standalone', output: 'standalone',
// This prevents Webpack from bundling svg-captcha and breaking its font paths webpack: (config, { isServer }) => {
serverExternalPackages: ['svg-captcha'], // Force Webpack to leave svg-captcha completely alone on the server
if (isServer) {
config.externals.push('svg-captcha');
}
return config;
},
}; };
export default nextConfig; export default nextConfig;