-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Issue Rendering MDX with Tanstack Start #451
Comments
It appears someone else has MDX working with Tanstack start as shown here: TanStack/router#3047 (comment) . Perhaps my code is just bad code as i'm less familiar with MDX. Haven't attempted to rewrite but i'll leave this up for now, but feel free to close this issue if there isn't an issue. |
I think the problem is that you are trying to compile mdx with a normal markdown parser: const html = await compileMarkdown(context, document);
const mdx = await compileMDX(context, document); You compile every file with markdown and mdx. The markdown compiler can't compile the mdx code, because it can't understand the react components. You can use the mdx compiler for mdx and normal markdown files. |
If the issue persists, please feel free to reopen it. |
I'm having an issue rendering MDX in Tanstack Start.
Reproduction: https://stackblitz.com/edit/tanstack-router-mkpny79c?file=app%2Fcomponents%2Fblog-page.tsx
Navigate to the Blog page and then click on the
MDX Example
post, which renders theBlogPage
component. You'll see the error below.The text was updated successfully, but these errors were encountered: