[Feature]: Allow providerImportSource
to be set in xdm.compile
options argument via mdx
in remix.config.js
#2907
Replies: 8 comments
-
@joshuaellis I'm facing the same issue. Are you still going to create a PR? |
Beta Was this translation helpful? Give feedback.
-
I'm also facing the same issue. Doesn't seem like the |
Beta Was this translation helpful? Give feedback.
-
@chaance was there a reason this feature request has been moved to a discussion? |
Beta Was this translation helpful? Give feedback.
-
@joshuaellis We are moving feature requests without current action items from issues to discussions for internal organization purposes. We are keeping our eye on both! |
Beta Was this translation helpful? Give feedback.
-
It would be awesome to be able to use MDXProvider with Remix. Are there any recommended workarounds for this at the moment? |
Beta Was this translation helpful? Give feedback.
-
You can use |
Beta Was this translation helpful? Give feedback.
-
Does the Remix team plan to merge PR #3911 ? Having this config option would be very helpful. |
Beta Was this translation helpful? Give feedback.
-
With the forthcoming vite compiler, apps have complete control over how they want to handle non-javascript imports like MDX. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the new or updated feature that you are suggesting?
Be able to pass
providerImportSource
in themdx
settings of theremix.config.js
like so:Why should this feature be included?
As demonstrated in the Advanced Configuration space of the MDX sections, we can add remark & rehype plugins, which is great. However
xdm
does not supply an MDXProvider like@mdx-js/react
so I cannot wrap all the docs layout in one provider to mutate the passedcomponents
like so:You can pass components with
xdm
by importing the MDX directly into the page, but then I can't have a file structure like so:Where I believe to do the
xdm
way I would have to set up thecomponents
everytime. However, settingproviderImportSource
allows us to cross runtimes and therefore enableMDXProvider
from@mdx-js/react
. This means I don't need to have seperate templates and content files for pages likedocs/index
ordocs/getting-started
.I was going to create a PR straight away for this, but I thought i should float the idea first.
Beta Was this translation helpful? Give feedback.
All reactions