Next.js Discord

Discord Forum

mdx plugins issue

Unanswered
Garganey posted this in #help-forum
Open in Discord
GarganeyOP
Hello!
I'm having trouble with installing plugins for next-mdx (primarily remarkMath and rehypeKatex)
I've made a new project (new next.js) and then I install next-mdx

then I import a simple .mdx folder to page (something really simle like # Hello World)

works all good, renders perfectly

but once I change next-config to include any plugin
that is remarkPlugins or rehypePlugins e.g.

import createMDX from '@next/mdx'

import remarkMath from 'remark-math'

const nextConfig = {
  pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
}
 
const withMDX = createMDX({
  options: {
    remarkPlugins: [remarkMath],
  },
})
 
export default withMDX(nextConfig)


I get the following issue:

0 Replies