-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
73 lines (62 loc) · 1.82 KB
/
next.config.js
File metadata and controls
73 lines (62 loc) · 1.82 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
output: 'standalone',
// Instrumentation hook is enabled by default in Next.js 16
// No need for experimental flag
// Logging configuration - show all errors
logging: {
fetches: {
fullUrl: true,
},
},
// Don't remove console in development - we need it for error logging
compiler: {
removeConsole: process.env.NODE_ENV === 'production' ? { exclude: ['error', 'warn'] } : false,
},
// Use webpack instead of Turbopack for Solana compatibility
webpack: (config, { dev, isServer }) => {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
net: false,
tls: false,
};
// Enable polling for hot reload in Docker (both client and server)
if (dev) {
config.watchOptions = {
poll: 500, // Check for changes every 500ms for faster hot reload
aggregateTimeout: 200, // Wait 200ms before rebuilding after first change
ignored: [
'**/node_modules/**',
'**/.git/**',
'**/.next/**',
'**/dist/**',
'**/build/**',
],
followSymlinks: false,
};
}
// Show more detailed errors in development
if (dev) {
config.optimization = {
...config.optimization,
minimize: false,
};
}
return config;
},
// Disable error overlay in development - use custom error pages instead
devIndicators: {
buildActivity: true,
buildActivityPosition: 'bottom-right',
},
// Show errors in console
onDemandEntries: {
maxInactiveAge: 25 * 1000,
pagesBufferLength: 2,
},
// Use webpack for build (Turbopack is default in Next.js 16)
// We need webpack for Solana compatibility
};
module.exports = nextConfig;