-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
31 lines (28 loc) · 870 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
31
import createMDX from '@next/mdx'
import { remarkCodeHike } from '@code-hike/mdx'
// import { remarkHeadingId } from 'remark-custom-heading-id' // doesn't work for now, see https://github.com/Eyas/md-heading-id/issues/2
import shiki from 'shiki'
/** @type {import('next').NextConfig} */
const nextConfig = {
// https://github.com/P5-wrapper/react/issues/162#issuecomment-1186425566
reactStrictMode: false,
// Append the default value with md extensions
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
}
const withMDX = createMDX({
extension: /\.mdx?$/,
options: {
remarkPlugins: [
[
// remarkHeadingId,
remarkCodeHike,
{
theme: await shiki.loadTheme('themes/light-plus.json'),
showCopyButton: true,
},
],
],
rehypePlugins: [],
},
})
export default withMDX(nextConfig)