-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
39 lines (37 loc) · 990 Bytes
/
next.config.js
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
import remarkGfm from 'remark-gfm'
import remarkSupersub from 'remark-supersub'
import remarkToc from 'remark-toc'
import rehypeSlug from 'rehype-slug'
import rehypeExternalLinks from 'rehype-external-links'
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
experimental: { esmExternals: true },
pageExtensions: ['md', 'mdx', 'jsx', 'js'],
webpack: function (config) {
config.module.rules.push({
test: /\.mdx?$/,
use: [
{
loader: '@mdx-js/loader',
options: {
remarkPlugins: [
remarkGfm,
[remarkToc, { maxDepth: 2, tight: true, ordered: true }],
remarkSupersub,
],
rehypePlugins: [
rehypeSlug,
[
rehypeExternalLinks,
{ target: '_blank', rel: ['noopener noreferrer'] },
],
]
}
}
]
})
return config
}
}
export default nextConfig