vercel / next.js

The React Framework
https://nextjs.org
MIT License
125.56k stars 26.82k forks source link

Docs: Note that need to turn off mdxRs when using MDX plugins #47098

Closed paulwongx closed 11 months ago

paulwongx commented 1 year ago

What is the improvement or update you wish to see?

As per this issue, it's not stated in the docs that you need to turn off mdxRs in order to use remark/rehype/recma plguins. https://stackoverflow.com/questions/75571651/using-remark-and-rehype-plugins-with-nextjs-13

The relevant part of the docs is here: https://beta.nextjs.org/docs/guides/mdx#remark-and-rehype-plugins

Is there any context that might help us understand?

State that mdxRs needs to be turned off for import nextMDX from "@next/mdx" to work.

Does the docs page already exist? Please link to it.

https://beta.nextjs.org/docs/guides/mdx#remark-and-rehype-plugins

mattrossman commented 1 year ago

This was really frustrating for me because the docs specifically tell you to enable mdxRs at the start, then proceeds to show how to add plugins, then at the very end of the page it's mentioned not to use the option because it's experimental. Took me a while to connect the dots as to why plugins were silently failing.

If the option isn't recommended, it probably shouldn't be in the "Getting Started" section that newcomers will be following.

lu-zen commented 1 year ago

This still is a problem.

leerob commented 11 months ago

Fixed!

github-actions[bot] commented 11 months ago

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.