Using mdx without React
See original GitHub issue./node_modules/@mdx-js/tag/dist/mdx-tag.js
0:0 error Module not found: Error: Can't resolve 'react' in
'/Users/fl-macbook-retina/Dropbox/Projects/node_js_server/node_modules/@mdx-js/tag/dist'
I wanna use Mdx for a project where I’m not using React but something similar. In my Webpack config I’ve configured babel the following way to not transform Jsx into React.createElement
but into just dom
. Can I get MDX to threat Jsx the same way?
{
loader: 'babel-loader',
options: {
presets: ['env', 'react'],
plugins: [
["transform-react-jsx", {
"pragma": "dom" // default pragma is React.createElement
}]
]
}
},
Seems like it’s not currently possible?
I believe it would be if one could make the following line a configuration option: https://github.com/mdx-js/mdx/blob/master/packages/loader/index.js#L10
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Getting started - MDX
This article explains how to integrate MDX into your project. It shows how to use MDX with your bundler and JSX runtime of...
Read more >Is ".mdx" file format only supported/used by React.js
Yes you can use mdx outside of React but not everywhere, Check out this guides I hope they help! mdx for Vue.js: ...
Read more >MDX and React - Docusaurus
While Docusaurus parses both .md and .mdx files using MDX, some of the syntaxes are treated slightly differently by third-party tools.
Read more >Advanced Features: Using MDX - Next.js
Where MDX shines is in its ability to let you create and use your React components directly in the markup. This opens up...
Read more >MDX, not your parents' markdown - blog
... and cleaner way of using React components in our Markdown. ... And now our components are provided to the MDX renderer and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Facing the same issue, I’m trying to use mdx with Hyperapp.
So how do I change the Pragma?