-
Notifications
You must be signed in to change notification settings - Fork 3
/
next.config.mjs
30 lines (27 loc) · 799 Bytes
/
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
import remarkGfm from 'remark-gfm';
import rehypeImgSize from 'rehype-img-size';
import mdx from '@next/mdx';
const withMDX = mdx({
extension: /\.mdx?$/,
options: {
// If you use remark-gfm, you'll need to use next.config.mjs
// as the package is ESM only
// https://github.com/remarkjs/remark-gfm#install
remarkPlugins: [remarkGfm],
rehypePlugins: [[rehypeImgSize, { dir: 'public' }]],
// If you use `MDXProvider`, uncomment the following line.
providerImportSource: '@mdx-js/react',
},
});
export default withMDX({
swcMinify: true,
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
async rewrites() {
return [
{
source: '/api/v1/:path*',
destination: `${process.env.PODIUM_API_BASE_URL}/:path*`,
},
];
},
});