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

Upgrade to mdx 2.x #230

Closed
joepio opened this issue Jan 31, 2022 · 4 comments · Fixed by #211
Closed

Upgrade to mdx 2.x #230

joepio opened this issue Jan 31, 2022 · 4 comments · Fixed by #211

Comments

@joepio
Copy link

joepio commented Jan 31, 2022

First off: thanks for maintaining this repo, it's awesome.

Version 2.0 of mdx has just been released has a pre-release, and has a couple of benefits:

  • Improved syntax makes it easier to use markdown in JSX
  • JavaScript expressions turn {2 * Math.PI} into 6.283185307179586
  • New esbuild, Rollup, and Node.js integrations
  • Any JSX runtime: React, Preact, Vue, Emotion, you name it, they’re all supported
  • Improved AST exposes more info in greater detail
  • Compiles at least 25% faster
  • Generated code runs twice as fast (100% faster)
  • Bundle size of @mdx-js/mdx is more than three times as small (250% smaller)

Here's the migration guide.

Are there plans for next-mdx-remote to upgrade to this new version?

Edit: just noticed there's already a PR, nice! Might be good to keep this issue open as a reference, or maybe just close it. #211

@jescalan
Copy link
Contributor

@joepio - it has not yet been released, you can see this in the release log, and in the large red warning box in the site that you linked that says it hasn't been released.

That being said, we have some good news! As you have discovered, we have a PR open to support it as soon as it is released, and if you are on a prerelease and want to test it, you can do so using npm i next-mdx-remote@mdx2. So nothing should be holding you back 😁

@joepio
Copy link
Author

joepio commented Jan 31, 2022

Thanks @jescalan!

@collinwu
Copy link

collinwu commented Feb 1, 2022

mdx 2.0.0 just released!

thank you maintainers & thank you for this library 🙏

@jescalan
Copy link
Contributor

jescalan commented Feb 1, 2022

Closing this issue - anyone interested can refer to the PR where the upgrade is implemented for further info, and anyone eager to try it out immediately before that PR is released can install the v2-compatible version with npm i next-mdx-remote@mdx2 today 😁

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

Successfully merging a pull request may close this issue.

3 participants