-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
components in MdxProvider is not working sometimes #2077
Comments
@phshy0607 could you share a replication of the issue you are seeing? Here are some starters which could be used to make a replication quickly:
|
@ChristianMurphy The document package I working on is https://github.com/BlizzBolts/docit The provider is used like this: https://github.com/BlizzBolts/docit/blob/master/src/client/components/Document/index.tsx I will try to make a reproduce if I really could. It's not 100% reproducible. |
@ChristianMurphy It's an issue related to Vite or Esbuild. During vite develop server, vite will do a I don't know it's related to esbuild which transform deps underneath or vite itself, but my issue is solved. You can close it for now, thanks. |
Initial checklist
Affected packages and versions
2.1.2
Link to runnable example
No response
Steps to reproduce
I have a document tool that uses MDX as internal.
Users' markdown file are wrapped in a
Document
component.like:
Sometimes console says
I've checked React Devtools
Seems like the Components are correctly inject.
I debugged into the source code, and i found this
The
props.components
isundefined
I didn't dig into MDX codebase that hard.
I've checked #1986 #1988 , but does not likely to be related.
Could anyone give me some hints for this kind of issue?
Expected behavior
The component injected in MDXProvider works as expected.
Actual behavior
Injected Component is undefined.
Runtime
Node v14
Package manager
yarn v1
OS
macOS
Build and bundle tools
Vite
The text was updated successfully, but these errors were encountered: