-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
83 lines (80 loc) · 2.53 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
// @ts-check
import { createMDX } from "fumadocs-mdx/next";
const withMDX = createMDX();
/** @type {import("next").NextConfig} */
const config = {
reactStrictMode: true,
redirects: async () => [
{
source: "/add-headers-and-status-to-response-in-route-handlers",
destination:
"https://nextjs.org/docs/app/building-your-application/routing/router-handlers#cors",
permanent: true,
},
{
source: "/request-body-in-route-handlers",
destination:
"https://nextjs.org/docs/app/building-your-application/routing/router-handlers#request-body",
permanent: true,
},
{
source: "/cannot-read-properties-of-null-error-hooks-contexts",
destination:
"https://nextjs.org/docs/getting-started/react-essentials#the-use-client-directive",
permanent: true,
},
// Redirect old slugs to new shortened slugs
{
source: "/fetching-own-api-endpoint-in-getserversideprops-and-similar-functions",
destination: "/fetch-api-in-getserversideprops",
permanent: true,
},
{
source: "/fetching-own-api-endpoint-in-react-server-components",
destination: "/fetch-api-in-rsc",
permanent: true,
},
{
source: "/get-pathname-in-server-components",
destination: "/get-pathname-in-rsc",
permanent: true,
},
{
source: "/how-do-i-use-x-in-the-app-router",
destination: "/use-x-in-app-router",
permanent: true,
},
{
source: "/how-to-create-a-minimal-reproduction-repository",
destination: "/minimal-reproduction-repository",
permanent: true,
},
{
source: "/how-to-set-metadata-to-page-tsx-rendered-as-client-components",
destination: "/metadata-client-components",
permanent: true,
},
{
source: "/module-not-found-error-on-deployment-but-build-works-fine-locally",
destination: "/module-not-found-due-to-case-sensitivity",
permanent: true,
},
{
source: "/when-is-a-component-a-client-component-in-the-app-router",
destination: "/when-client-component-in-app-router",
permanent: true,
},
{
source: "/why-is-document-or-window-not-defined-in-client-component",
destination: "/browser-api-client-component",
permanent: true,
},
{
source:
"/why-is-the-session-unavailable-when-i-fetch-the-session-route-in-next-auth-from-my-server-component",
destination: "/session-unavailable-in-server-component",
permanent: true,
},
],
};
export default withMDX(config);