-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
40 lines (35 loc) · 881 Bytes
/
Copy pathnext.config.mjs
File metadata and controls
40 lines (35 loc) · 881 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
37
38
39
40
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
// Enhanced development experience
turbopack: {
rules: {
'*.svg': {
loaders: ['@svgr/webpack'],
as: '*.js',
},
},
},
// Enable fast refresh for better hot reload
webpack: (config, { dev, isServer }) => {
if (dev && !isServer) {
// Improve hot reload performance
config.watchOptions = {
poll: 1000,
aggregateTimeout: 300,
ignored: ['**/node_modules/**', '**/.git/**', '**/.next/**'],
}
// Enable fast refresh
config.resolve.alias = {
...config.resolve.alias,
'react-refresh/runtime': require.resolve('react-refresh/runtime'),
}
}
return config
},
// Optimize for development
env: {
FAST_REFRESH: 'true',
},
}
export default nextConfig