-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnext.config.ts
46 lines (41 loc) · 998 Bytes
/
next.config.ts
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
import type { NextConfig } from 'next';
import createMDX from '@next/mdx';
import { ENV_KEYS } from '@/util/env';
for (const key of ENV_KEYS) {
if (!process.env[key]) {
throw new Error(`Missing environment variable: ${key}`);
}
}
const nextConfig: NextConfig = {
transpilePackages: ['next-mdx-remote'],
async redirects() {
return [
{
source: '/policy',
destination: '/notice/terms-of-use',
permanent: false,
},
{
source: '/about',
destination: '/notice/about-academ',
permanent: false,
},
{
source: '/notice',
destination: '/notices/1',
permanent: false,
},
{
source: '/notices',
destination: '/notices/1',
permanent: false,
},
];
},
};
import remarkGfm from 'remark-gfm';
const withMDX = createMDX({
// Add markdown plugins here, as desired
options: { remarkPlugins: [remarkGfm] },
});
export default withMDX(nextConfig);