-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
48 lines (46 loc) · 1.2 KB
/
next.config.js
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
/** @type {import('next').NextConfig} */
const { i18n } = require("./next-i18next.config");
const nextConfig = {
async headers() {
return [
{
source: '/:all*(svg|jpg|png)',
locale: false,
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000 , must-revalidate',
}
],
},
{
// This doesn't work for 'Cache-Control' key (works for others though):
source: '/_next/image(.*)',
headers: [
{
key: 'Cache-Control',
// Instead of this value:
value: 'public, max-age=180, s-maxage=180, stale-while-revalidate=180',
// Cache-Control response header is `public, max-age=60` in production
// and `public, max-age=0, must-revalidate` in development
},
],
},
];
},
reactStrictMode: true,
i18n,
basePath: '/blog',
compiler: {
styledComponents: true
},
productionBrowserSourceMaps: true,
staticPageGenerationTimeout: 1000,
experimental: {
largePageDataBytes: 128 * 1000000,
workerThreads: false,
cpus: 4,
optimisticClientCache: false
},
}
module.exports = nextConfig