-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Vue components created with JSX is not working in Markdown files #318
Comments
VuePress currently does not support JSX. We will need to move to Babel for this. |
Hi @yyx990803, |
Will release it at 0.9.0: #419 ❤️ |
Shouldn't this work with version 3? I'm running 3.1.1 and I'm still getting this error. |
Same here. I'm having problems importing components built with JSX. |
vuepress-error.zip
I'm using VuePress for documenting my components. For demo, purpose I'm registering it globally in
enhanceApp.js
and using it.md
files.Attaching a reproducible project with a custom component.
I have used
yarn
to install dependecies.To reproduce:
src/components/MyComponent.js
.return
statement to see the output.To view docs: run
yarn docs:dev
I guess the problem is that it
VuePress
doesn't havebabel-plugin-transform-vue-jsx
. So is this thing in roadmap, or will not be supported? Is there any other way to handle JSX in render function for VuePressIf I use
createElement
method directly with arguments, its rendering properly.Now in my
.md
files if I useIts working correctly.
But if I use
JSX
inrender
method, then it's showingReferenceError: React is not defined
in console.The text was updated successfully, but these errors were encountered: