Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to work in Next.js 15.10 with mdxRs #490

Open
yangbo5207 opened this issue Dec 17, 2024 · 2 comments
Open

how to work in Next.js 15.10 with mdxRs #490

yangbo5207 opened this issue Dec 17, 2024 · 2 comments

Comments

@yangbo5207
Copy link

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
Copy link
Contributor

pomber commented Dec 23, 2024

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
Copy link

amannn commented Jan 27, 2025

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants