@next/mdx
npm install @next/mdx @mdx-js/loader or yarn add @next/mdx @mdx-js/loader Create a next.config.js in your project Optionally you can provide MDX plugins: Optionally you can add your custom Next.js configuration as parameter Optionally you can match other file extensions for MDX compilation, by default only .mdx is supported Define the pageExtensions option to have Next.js handle .mdx files in the pages directory as pages: Follow this guide from the MDX docs.
https://www.npmjs.com/package/@next/mdx