forked from geist-org/geist-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
71 lines (62 loc) · 1.41 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
const withMDX = require('@next/mdx')({
extension: /\.(md|mdx)?$/,
options: {
rehypePlugins: [require('@mapbox/rehype-prism')],
},
})
const nextConfig = {
target: 'serverless',
pageExtensions: ['jsx', 'js', 'mdx', 'md', 'ts', 'tsx'],
cssModules: true,
cssLoaderOptions: {
importLoaders: 1,
localIdentName: '[local]___[hash:base64:5]',
},
env: {
VERSION: require('./package.json').version,
},
trailingSlash: false,
experimental: {
reactStrictMode: true,
},
async redirects() {
return [
{
source: '/docs/getting-started/:path*',
permanent: true,
destination: '/en-us/guide/:path*',
},
{
source: '/en-us/getting-started/:path*',
permanent: true,
destination: '/en-us/guide/:path*',
},
{
source: '/zh-cn/getting-started/:path*',
permanent: true,
destination: '/zh-cn/guide/:path*',
},
{
source: '/zh-cn',
permanent: true,
destination: '/zh-cn/guide/introduction',
},
{
source: '/en-us',
permanent: true,
destination: '/en-us/guide/introduction',
},
{
source: '/',
permanent: true,
destination: '/en-us',
},
{
source: '/icons',
permanent: true,
destination: '/en-us/components/icons',
},
]
},
}
module.exports = withMDX(nextConfig)