forked from worldcoin/world-id-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
83 lines (80 loc) · 1.84 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
72
73
74
75
76
77
78
79
80
81
82
83
const { remarkCodeHike } = require('@code-hike/mdx')
const theme = require('shiki/themes/min-light.json')
/** @type {import('@next/mdx')} */
const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
options: {
remarkPlugins: [[remarkCodeHike, { theme }]],
// cspell:disable-next-line
rehypePlugins: [],
providerImportSource: '@mdx-js/react',
},
})
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
pageExtensions: ['ts', 'tsx', 'md', 'mdx'],
experimental: {
newNextLinkBehavior: true,
},
async redirects() {
return [
{
source: '/js',
destination: '/idkit',
permanent: true,
},
{
source: '/js/:slug',
destination: '/idkit/:slug',
permanent: true,
},
{
source: '/protocol',
destination: '/id/protocol',
permanent: false,
},
{
source: '/test',
destination: '/id/testing',
permanent: false,
},
{
source: '/simulator',
destination: '/id/testing',
permanent: false,
},
{
source: '/privacy',
destination: '/advanced/privacy',
permanent: false,
},
{
source: '/zkp',
destination: '/advanced/zero-knowledge-proofs',
permanent: false,
},
{
source: '/waitlist',
destination: 'https://toolsforhumanity.typeform.com/sdk-waitlist',
permanent: true,
},
{
source: '/use-cases',
destination:
'https://worldcoin.notion.site/World-ID-df11c0d2a42b4890a1e9e8d15b9f550f',
permanent: false,
},
]
},
async rewrites() {
return [
{
source: '/api/:slug*',
destination: '/api-docs/:slug*',
},
]
},
}
module.exports = withMDX(nextConfig)