-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnext.config.mjs
More file actions
78 lines (75 loc) · 1.56 KB
/
Copy pathnext.config.mjs
File metadata and controls
78 lines (75 loc) · 1.56 KB
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
import nextMdx from "@next/mdx";
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
images: {
domains: [
...(process.env.NODE_ENV === "development" ? ["localhost"] : []),
"images.otomadb.com",
"imgproxy.otomadb.com",
"nicovideo.cdn.nimg.jp",
"img.cdn.nimg.jp",
"i.ytimg.com",
"s.gravatar.com",
"secure.gravatar.com",
"i1.sndcdn.com",
],
unoptimized: process.env.NODE_ENV === "production",
disableStaticImages: true,
},
experimental: {
mdxRs: true,
turbo: {
rules: {
"*.svg": {
loaders: ["@svgr/webpack"],
as: "*.js",
},
},
},
},
redirects() {
return [
{
source: "/signin",
destination: "/auth/signin",
permanent: true,
},
{
source: "/signup",
destination: "/auth/signup",
permanent: true,
},
{
source: "/videos",
destination: "/mads",
permanent: true,
},
{
source: "/videos/:serial*",
destination: "/mads/:serial*",
permanent: true,
},
{
source: "/me/mylist/likes",
destination: "/me/likes",
permanent: true,
},
];
},
webpack: (config) => {
config.module.rules.push({
test: /\.svg$/,
use: [{ loader: "@svgr/webpack" }],
});
return config;
},
};
const withMdx = nextMdx();
export default withMdx(nextConfig);