-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Using mdx in @next #5149
Comments
The err I mentioned in OP:
Not sure what's root cause... Odd to me the same inline-loader syntax in app code and same version of |
@gaearon should we support this natively or via a babel macro? If natively, when imported via Macro would work like so: import { mdx } from 'mdx.macro'
const Content = mdx('./Content.mdx'); |
Macro is nice if it means we don’t have to include MDX compiler by default. |
Tnx guys, I hadn't yet been introduced to The usage hinted at above and expectation that users be responsible for satisfying a dep on next steps: shall I open an an issue with the I'm happy CRA@next is providing an escape hatch for these sorts of things. |
We should ask for a |
hi! just browsing. i am not sure i understand what exactly the macro would solve for you since @eckdanny-osi's original problem was that the webpack loader inlining was broken. the macro won't be able to do anything to fix that. maybe we can open an issue over at @mdx-js and follow on from there. |
Using the method displayed in OP is not supported by CRA and never expected to work. |
hey guys. sry haven't checked back in on this convo in a while. My project is back to using webpack's inline-loader syntax w/ We were on If my project hits more walls we can't circumnavigate with inline-loader syntax, we'll likely eject or maintain a fork. Don't know how unique my situation is... am curious to what degree CRA users want mdx support tho |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
One issue with supporting MDX in the same way that SCSS is supported is that it's rare that you'll want to use vanilla MDX. At minimum, you're probably going to want to add plugins to improve typography, add emoji support, and handle front matter -- but you can go further and do things like add I've tried putting together an MDX macro with all this, but can't find a way to get recompile-on-save working, which is a bummer. I do have MDX working with CRA@2 though, using {
"presets": ["react-app"]
} Even if this isn't supported, I feel like it's probably the most pragmatic approach atm. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. |
I think many CRA users like myself are using
mdx-js/mdx
. Themdx docs for CRA setup
usecreate-react-app-rewired
, but I've managed just fine in CRA v1.x without ejecting or rewiring by inlining webpack loader and eslint overrides:I tried the same course of action in
@2.0.0
but its not working for reasons I haven't looked into yet. (I'll leave details in a comment below. Raising atmdx-js
may be appropriate.)THE REASON I'm submitting this issue is to identify MDX usage as a likely reason for ejecting/rewiring in response to @Timer's comment timarney/react-app-rewired#162 (comment). The future support outlook for rewired and missing workaround for CRA@next is unfortunate for MDX users.
The text was updated successfully, but these errors were encountered: