-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
36 lines (30 loc) · 895 Bytes
/
next.config.js
File metadata and controls
36 lines (30 loc) · 895 Bytes
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
/** @type {import('next').NextConfig} */
const nextConfig = {
// Enable React strict mode for better development experience
reactStrictMode: true,
// Configure compiler options to help with hydration issues
compiler: {
// Disable removal of console logs in production
removeConsole: false,
},
// Experimental features
experimental: {
// Improve hydration error reporting
optimizeServerReact: true,
// Use new React features
serverActions: {
allowedOrigins: ['localhost:3000'],
},
},
// Configure webpack to handle large serializations
webpack: (config) => {
// Optimize serialization performance
config.infrastructureLogging = {
level: 'error',
};
// Use Buffer for serializing large strings
config.optimization.moduleIds = 'deterministic';
return config;
},
}
module.exports = nextConfig