-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathnext.config.js
46 lines (46 loc) · 998 Bytes
/
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
module.exports = {
// Configurable site features we support:
// distDir: 'build',
generateBuildId: () => 'build-id',
i18n: {
defaultLocale: 'en',
locales: ['en', 'es', 'fr'],
},
async headers() {
return [
{
source: '/',
headers: [
{
key: 'x-custom-header',
value: 'my custom header value',
},
],
},
]
},
trailingSlash: true,
// Configurable site features _to_ support:
basePath: '/docs',
// Rewrites allow you to map an incoming request path to a different destination path.
async rewrites() {
return {
beforeFiles: [
{
source: '/old/:path*',
destination: '/:path*',
},
],
}
},
// Redirects allow you to redirect an incoming request path to a different destination path.
async redirects() {
return [
{
source: '/redirectme',
destination: '/',
permanent: true,
},
]
},
}