Add webpack config to exclude Node.js modules from client bundle

This commit is contained in:
bitc0de committed 2025-12-17 16:01:18 +01:00
1 parent 8735a0714e
commit 44a5e7d5ad
1 file changed
+11
+11
View File
@@ -25,6 +25,17 @@ const nextConfig = {
bodySizeLimit: '2mb', bodySizeLimit: '2mb',
}, },
}, },
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
path: false,
crypto: false,
}
}
return config
},
output: 'standalone', output: 'standalone',
} }