how to work in Next.js 15.10 with mdxRs
yangbo5207 opened this issue · 2 comments
yangbo5207 commented
next.config.js like this
const withMDX = createMDX({
options: {
remarkPlugins: [],
rehypePlugins: [['rehype-katex', { strict: true, throwOnError: true }]],
},
})
but codehike can not use name
import {remarkCodeHike, recmaCodeHike} from 'codehike/mdx'
???
so,what should I do?
pomber commented
mdxRs
doesn't support remarkPlugins
yet, that means you can't use Code Hike with mdxRs
.
not sure the about the next.config.js
example you put there, it doesn't look like you are using mdxRs
.
amannn commented
The issue seems to be that @next/mdx
only works with serializable options when using Turbopack (ref).
Is there any way how to get this to work with Code Hike?
E.g. this works:
// ...
const withMDX = createMDX({
options: {
rehypePlugins: [['rehype-mdx-code-props']]
}
});
export default withMDX(nextConfig);