-
Notifications
You must be signed in to change notification settings - Fork 141
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
v5
is coming on May 22. Test your apps!
#457
Comments
No more TS errors, great job 🎉 |
I get this error in Next.js
|
@typeofweb Thanks for sharing this! I've opened a new issue so I can track this down and share updates. If you happen to have a minimal reproduction that'd be greatly appreciated, otherwise I'll try to get to this early next week. |
Also ran into the I wanted to find a way around this, and I ended up finding import { evaluate, type EvaluateOptions } from '@mdx-js/mdx'
import * as runtime from 'react/jsx-runtime'
export async function MDX(props: MDXProps) {
const { source, ...rest } = props
const { default: MDXContent } = await evaluate(source, {
...rest,
...(runtime as Pick<EvaluateOptions, 'Fragment' | 'jsx' | 'jsxs'>),
})
return <MDXContent />
} I tried replacing Is this a simpler alternative to using these libraries, for React Server Components environments? |
@typeofweb @karlhorky Would y'all mind providing a reproduction in #458? Based on the error message it looks like you're passing generated MDX from server to client, which should work via |
Added a reproduction - no Client Components necessary: |
|
@dstaley thanks for all the hard work and effort put in here! |
The next major release of
next-mdx-remote
,v5
, will be released on May 22! This version will be compatible with the latest version of MDX and other packages (such as remark plugins). It also makes significant changes to how the package is published, which should reduce the number of TypeScript errors, especially in apps using modern module resolution strategies.You can help catch any last remaining bugs by installing the latest canary version and testing your applications.
If you encounter any issues, please open an issue with a minimal reproduction so that we can investigate.
The text was updated successfully, but these errors were encountered: