/
next.config.js
52 lines (52 loc) · 1.26 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
module.exports = {
experimental: {
appDir: true,
sri: {
algorithm: 'sha256',
},
},
output: 'standalone',
rewrites: async () => {
return {
afterFiles: [
{
source: '/rewritten-to-dashboard',
destination: '/dashboard',
},
{
source: '/search-params-prop-rewrite',
destination:
'/search-params-prop?first=value&second=other%20value&third',
},
{
source: '/search-params-prop-server-rewrite',
destination:
'/search-params-prop/server?first=value&second=other%20value&third',
},
{
source: '/rewritten-use-search-params',
destination:
'/hooks/use-search-params?first=value&second=other%20value&third',
},
{
source: '/rewritten-use-pathname',
destination: '/hooks/use-pathname',
},
{
source: '/hooks/use-selected-layout-segment/rewritten',
destination:
'/hooks/use-selected-layout-segment/first/slug3/second/catch/all',
},
],
}
},
redirects: () => {
return [
{
source: '/redirect/a',
destination: '/dashboard',
permanent: false,
},
]
},
}