-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
32 lines (30 loc) · 1.16 KB
/
Copy pathnext.config.js
File metadata and controls
32 lines (30 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/** @type {import('next').NextConfig} */
const nextConfig = {
// --- YENİ EKLENEN KISIM: Sunucu Bileşeni Dışlama ---
// Bu ayar, belirli node_modules paketlerinin Next.js'in Sunucu Bileşenleri
// derlemesinden hariç tutulmasını sağlar, böylece `encoding` ve `pino-pretty`
// gibi Node.js'e özgü bağımlılık uyarıları client bundle'da görünmez.
experimental: {
serverComponentsExternalPackages: ['@metamask/sdk', 'pino', 'encoding'],
},
// Allow ngrok and other dev origins
allowedDevOrigins: ['*.ngrok-free.dev', '*.ngrok.io'],
// ----------------------------------------------------
// Bu ayar, client-side (tarayıcı) paketlemesi sırasında Node.js'e özgü modülleri
// yok saymaya devam eder. (İlk yaptığımız çözüm)
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
encoding: false, // MetaMask SDK uyarısını giderir
'pino-pretty': false, // WalletConnect uyarısını giderir
fs: false,
net: false,
tls: false,
crypto: false,
};
}
return config;
},
};
export default nextConfig;