-
Notifications
You must be signed in to change notification settings - Fork 354
Expand file tree
/
Copy pathnext.config.ts
More file actions
82 lines (76 loc) · 1.63 KB
/
next.config.ts
File metadata and controls
82 lines (76 loc) · 1.63 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import { createMDX } from 'fumadocs-mdx/next'
import type { NextConfig } from 'next'
const withMDX = createMDX()
const config: NextConfig = {
experimental: {
turbopackFileSystemCacheForDev: true
},
async redirects() {
return [
{
source: '/docs',
destination: '/docs/getting-started',
permanent: true
},
{
source: '/:locale/docs',
destination: '/:locale/docs/getting-started',
permanent: true
},
{
source: '/blog',
destination: '/blog/swr-v1',
permanent: true
},
{
source: '/:locale/blog',
destination: '/:locale/blog/swr-v1',
permanent: true
},
{
source: '/examples',
destination: '/examples/basic',
permanent: true
},
{
source: '/:locale/examples',
destination: '/:locale/examples/basic',
permanent: true
},
{
source: '/fr-FR/:path*',
destination: '/fr/:path*',
permanent: true
},
{
source: '/es-ES/:path*',
destination: '/es/:path*',
permanent: true
},
{
source: '/pt-BR/:path*',
destination: '/pt/:path*',
permanent: true
},
{
source: '/zh-CN/:path*',
destination: '/zh/:path*',
permanent: true
}
]
},
images: {
formats: ['image/avif', 'image/webp'],
remotePatterns: [
{
protocol: 'https',
hostname: 'assets.vercel.com'
},
{
protocol: 'https',
hostname: 'placehold.co'
}
]
}
}
export default withMDX(config)