-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
executable file
·47 lines (43 loc) · 1.18 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
import { withContentlayer } from "next-contentlayer";
import nextTranslate from "next-translate-plugin";
const isProd = process.env.NODE_ENV === "production";
const domain = process.env.NEXT_PUBLIC_METADATA_BASE || "nguyenhongthe.dev";
const images = {
domains: [
"localhost",
"127.0.0.1",
`media.${domain}`,
`static.${domain}`,
"nguyenhongthe.net",
],
};
const nextConfig = {
reactStrictMode: true,
pageExtensions: ["js", "jsx", "ts", "tsx", "md", "mdx"],
experimental: {
// appDir: true,
mdxRs: true,
},
trailingSlash: true,
// assetPrefix: isProd ? `https://cdn.${domain}` : undefined,
async redirects() {
return [
{
// does not add /docs since basePath: false is set
source: "/knowledge/cai-dat-xampp-tren-windows",
destination: "https://nguyenhongthe.net/cai-dat-xampp-tren-windows/",
basePath: false,
permanent: true,
},
{
// does not add /docs since basePath: false is set
source: "/knowledge/cai-dat-ssl-cho-xampp-tren-windows",
destination:
"https://nguyenhongthe.net/cai-dat-ssl-cho-xampp-tren-windows/",
basePath: false,
permanent: true,
},
];
},
};
export default withContentlayer(nextTranslate(nextConfig));