mdx
mdx copied to clipboard
MDXProvider is invalid after processSync processing when {jsxImportSource: 'vue', providerImportSource: '@mdx-js/vue'} is configured.
Initial checklist
- [x] I read the support docs
- [X] I read the contributing guide
- [X] I agree to follow the code of conduct
- [X] I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
3.0.1
Link to runnable example
No response
Steps to reproduce
- Write vite plug-in and use createProcessor provided by mdx. createProcessor({jsxImportSource: 'vue',providerImportSource: '@mdx-js/vue'})
- Use MDXProvider in jsx translated by @vitejs/plugin-vue-jsx plug-in to find that the components cannot be customized
Expected behavior
The MDXProvider can customize the components in the mdx file
Actual behavior
Cannot be customized, the components provided by the MDXProvider are invalid, and a warning is reported in the browser console inject() can only be used inside setup() or functional components.
Runtime
No response
Package manager
No response
OS
No response
Build and bundle tools
No response
demo warehouse address: https://github.com/miss-money/vite-plugin-mdx-demo-test/tree/master/demo/vue
This sounds like a bug in @vitejs/plugin-vue-jsx, why report it here not there? MDX compiles the jsx away already. That plugin doesn't see jsx?