Skip to content
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

MDXProvider is invalid after processSync processing when {jsxImportSource: 'vue', providerImportSource: '@mdx-js/vue'} is configured. #2453

Open
4 tasks done
luobingxun opened this issue Mar 6, 2024 · 2 comments

Comments

@luobingxun
Copy link

luobingxun commented Mar 6, 2024

Initial checklist

Affected packages and versions

3.0.1

Link to runnable example

No response

Steps to reproduce

  1. Write vite plug-in and use createProcessor provided by mdx. createProcessor({jsxImportSource: 'vue',providerImportSource: '@mdx-js/vue'})
  2. 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

@luobingxun
Copy link
Author

@wooorm
Copy link
Member

wooorm commented Mar 6, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants