From 44a5e7d5ad660119000a9575404718fe5405c82c Mon Sep 17 00:00:00 2001 From: bitc0de Date: Wed, 17 Dec 2025 16:01:18 +0100 Subject: [PATCH] Add webpack config to exclude Node.js modules from client bundle --- next.config.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/next.config.js b/next.config.js index 69b84b3..62e4b45 100644 --- a/next.config.js +++ b/next.config.js @@ -25,6 +25,17 @@ const nextConfig = { bodySizeLimit: '2mb', }, }, + webpack: (config, { isServer }) => { + if (!isServer) { + config.resolve.fallback = { + ...config.resolve.fallback, + fs: false, + path: false, + crypto: false, + } + } + return config + }, output: 'standalone', }