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 3 #25182

Closed
5 tasks done
Tracked by #25115
valentinpalkovic opened this issue Dec 12, 2023 · 1 comment · Fixed by #25303
Closed
5 tasks done
Tracked by #25115

Upgrade to MDX 3 #25182

valentinpalkovic opened this issue Dec 12, 2023 · 1 comment · Fixed by #25303
Assignees

Comments

@valentinpalkovic
Copy link
Contributor

valentinpalkovic commented Dec 12, 2023

Breaking Changes

The main breaking change is that Node.js 16 is now the minimum supported version.
Across the ecosystem there were several small internal breaking changes. Everything’s released already. You can update all plugins now. If you ran into problems before, it should work now.
We also removed some infrequently used deprecated APIs. You’re likely fine but gloss over the v3 migration guide if you get errors.
Important to note when you use your lesser-known but powerful evaluate, run, or outputFormat: 'function-body' APIs, please pass the baseUrl option. That makes sure import.meta.url, import, and export work. You’ll get a runtime error when those features are used otherwise.

from https://mdxjs.com/blog/v3/

Migration Guide

https://mdxjs.com/migrating/v3/

Tasks

Tasks

Preview Give feedback
@yannbf
Copy link
Member

yannbf commented Dec 27, 2023

As additional information, here are the packages that relate to MDX:

  • @storybook/docs-mdx (upgrade PR here)
  • @storybook/mdx1-csf
  • @storybook/mdx2-csf
  • @storybook/addon-docs (via usage of the aforementioned mdx-csf packages)

According to @shilman we ideally should get rid of both mdx-csf packages, and bring their functionality directly into addon-docs (and use @mdxjs/mdx v3 there). This means we will also stop supporting the CSF in MDX format.

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.

2 participants