-
Notifications
You must be signed in to change notification settings - Fork 27.7k
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
Improvements to the MDX Docs and replaced a leftover reference to babel #35332
Conversation
|
||
## @mdx-js/mdx | ||
|
||
Handle mdx strings client side, probably @mdx-js/mdx see official docs https://mdxjs.com/docs/getting-started/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we revert this or fix forward? This is not a complete sentence or using a correct link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think we should revert based on my other comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it needs to be fixed
@@ -56,6 +56,27 @@ The following steps outline how to setup `@next/mdx` in your Next.js project: | |||
}) | |||
``` | |||
|
|||
> Using MDX plugins will require using next.config.mjs because all the plugins are [ECMAScript modules](https://nodejs.org/api/esm.html) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is accurate. Could someone confirm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e.g. works fine here https://github.com/leerob/leerob.io/blob/main/next.config.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is accurate. Could someone confirm?
Most plugins are esm modules. Even remark and rehype themselves are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @timneutkens, who told me it was correct.
…e to babel (vercel#35332)" This reverts commit 5bf7265.
I am going to fix those issues and open a new PR |
Documentation / Examples
yarn lint
This PR adds the next.config.mjs version of the configuration, required for using remark and rehype plugins and adds a configuration for frontmatter. It also replaces a leftover reference to babel in next.config.js introduction page
Also shoutout to @homumado for helping get this information