Open mwskwong opened 3 months ago
Thank you for reporting this! This is technically a "issue" (using that term loosely) with MDX and a as-of-yet unreleased version of React. The change from React to use their own JSX namespace will have wide reaching implications, particularly for libraries like MDX that work in several non-React JSX ecosystems. It will likely take time for everything upstream to settle, but it's my current belief that this won't require any changes on the next-mdx-remote
side.
Gonna leave this open and pinned so that others can benefit from the patch you shared. Thanks again!
@mwskwong @dstaley How do you do it on CI ?
Describe the bug
Regarding the latest release of v5, which claimed to support React 19, please note that
@types/mdx
, a dependency of@mdx-js/mdx
and@mdx-js/react
, is still accessing the globalJSX
namespace, which now needs to be imported fromreact
in React 19. Ref: https://react.dev/blog/2024/04/25/react-19-upgrade-guide#the-jsx-namespace-in-typescriptAs such, we must patch
@types/mdx
to support React 19 for now. e.g.Reproduction
N/A
next-mdx-remote version
v5.0.0