-
Notifications
You must be signed in to change notification settings - Fork 94
/
next.config.mjs
99 lines (97 loc) · 2.43 KB
/
next.config.mjs
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
const basePath = process.env.BASE_PATH || ''
const distDir = process.env.DIST_DIR || undefined
const output = process.env.OUTPUT || undefined
/** @type {import('next').NextConfig} */
const nextConfig = {
productionBrowserSourceMaps: true,
images: {
// domains: ['codesandbox.io'],
unoptimized: true,
},
basePath,
distDir,
output,
async redirects() {
return [
{
source: '/home',
destination: '/',
permanent: true,
},
{
source: '/docs/:slug*',
destination: '/:slug*',
permanent: true,
},
//
{
source: '/xr',
destination: '/xr/getting-started/introduction',
permanent: true,
},
{
source: '/jotai',
destination: 'https://jotai.pmnd.rs/docs/introduction',
permanent: true,
},
{
source: '/jotai/:slug*',
destination: 'https://jotai.pmnd.rs/docs/:slug*',
permanent: true,
},
{
source: '/react-spring',
destination: 'https://react-spring.io',
permanent: true,
},
{
source: '/react-spring/:slug*',
destination: 'https://react-spring.io/#:slug*',
permanent: true,
},
{
source: '/drei',
destination: 'https://pmndrs.github.io/drei',
permanent: true,
},
{
source: '/drei/:slug*',
destination: 'https://github.com/pmndrs/drei#:slug*',
permanent: true,
},
//
{
source: '/react-three-fiber/:slug*',
destination: 'https://pmndrs.github.io/react-three-fiber/:slug*',
permanent: true,
},
{
source: '/zustand/:slug*',
destination: 'https://pmndrs.github.io/zustand/:slug*',
permanent: true,
},
{
source: '/a11y/:slug*',
destination: 'https://pmndrs.github.io/react-three-a11y/:slug*',
permanent: true,
},
{
source: '/react-postprocessing/:slug*',
destination: 'https://pmndrs.github.io/react-postprocessing/:slug*',
permanent: true,
},
{
source: '/uikit/:slug*',
destination: 'https://pmndrs.github.io/uikit/docs/:slug*',
permanent: true,
},
{
source: '/xr/:slug*',
destination: 'https://pmndrs.github.io/xr/docs/:slug*',
permanent: true,
},
]
},
}
// console.log('nextConfig=', nextConfig)
export default nextConfig