-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.mjs
79 lines (76 loc) · 2.06 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
import path from "node:path";
import url from "node:url";
import remarkFrontmatter from "remark-frontmatter";
import remarkMdxFrontmatter from "remark-mdx-frontmatter";
import bundleAnalyzer from "@next/bundle-analyzer"
const dirname = path.dirname(url.fileURLToPath(import.meta.url))
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === "true",
});
/** @type {import('next').NextConfig} */
export default withBundleAnalyzer({
async redirects() {
return [
{
source: "/eclipse-rsvp",
destination: "https://docs.google.com/forms/d/e/1FAIpQLSf3Fa7DclMJ3JVVduSjCY5kgi1nA-q4L4S-qy8Oi78sQ_nDUA/viewform",
permanent: false,
},
{
source: "/workshops/:slug*",
destination: "/events/workshops/:slug*",
permanent: true,
},
{
source: "/connections/:slug*",
destination: "/games/connections/:slug*",
permanent: true,
},
{
source: "/crosswords/:slug*",
destination: "/games/crosswords/:slug*",
permanent: true,
},
{
source: "/feedback",
destination: "https://forms.gle/HhQSGitE65vyjQKr8",
permanent: false,
},
{
source: "/events/students-run-studios/sign-up",
destination: "https://docs.google.com/forms/d/e/1FAIpQLSfQ3xTWhgN7sn7s1ddcULHNyrpmfgpkf9hkqW5uZQyPsSj9hg/viewform",
permanent: false,
},
{
source: "/srs/:slug*",
destination: "/events/students-run-studios/:slug*",
permanent: true,
},
{
source: "/students-run-studios/:slug*",
destination: "/events/students-run-studios/:slug*",
permanent: true,
},
]
},
pageExtensions: ["page.tsx", "page.jsx"],
webpack: (config, options) => {
config.resolve.alias["~"] = path.resolve(dirname, "src");
config.resolve.alias["@"] = path.resolve(dirname, "content");
config.module ??= {};
config.module.rules ??= [];
config.module.rules.push({
test: /\.mdx?$/,
use: [
{
loader: '@mdx-js/loader',
/** @type {import('@mdx-js/loader').Options} */
options: {
remarkPlugins: [remarkFrontmatter, remarkMdxFrontmatter]
}
}
]
});
return config
},
})