-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnext.config.js
More file actions
32 lines (31 loc) · 955 Bytes
/
Copy pathnext.config.js
File metadata and controls
32 lines (31 loc) · 955 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
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
experimental: {
staleTimes: {
dynamic: 30, // Cache dynamic pages for 30 seconds on client
static: 180, // Cache static pages for 3 minutes on client
},
},
env: {
customKey: 'my-value',
},
images: {
domains: ['random.imagecdn.app', 'picsum.photos', 'images.unsplash.com'],
},
// webpack: (config, { isServer, dev }) => {
// // Only enable detailed source maps in production and not for the server
// if (!isServer && !dev) {
// config.devtool = 'source-map';
// }
// return config;
// },
async rewrites() {
return [
{ source: '/sitemap.xml', destination: '/api/sitemaps/main' },
{ source: '/sitemaps/people.xml', destination: '/api/sitemaps/people' },
{ source: '/sitemaps/reports/:id.xml', destination: '/api/sitemaps/reports/:id' },
];
},
}
module.exports = nextConfig