-
Notifications
You must be signed in to change notification settings - Fork 132
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
h auto-injection doesn't work #152
Comments
Confirm - I've just added |
I believe this issue is a duplicate of this regression from last year: #65 |
@rellect does your babel.config.js includes Vue's babel preset ( |
@pera Not using the |
I have the same question when I run my unit test while I run dev and build was normal. Thank to @rellect and @pera ' s advice. I checked my .babelrc and found there is a 'transform-vue-jsx' in the plugin option and another 'transform-vue-jsx' in env option => test => plugin. So I delete the 'transform-vue-jsx' declear in the env. And it works. it seems to two plugins will each declare the 'h' when auto inject. Hope this would help somebody in the same situation like me. |
I solve this problem with removing 'transform-vue-jsx' declear in the babel.config.js. |
To confirm, I was hitting this issue too (vue cli 3). I removed I am assuming |
yeah, |
Hi
So I just installed vue-jsx for the first time, and I'm trying to run the provided example code that demonstrates
h
auto-injection, just copy pasted it to my app.js fileThe above doesn't compile and produces an error:
Should note that it does work when I add
h
as an argument (render (h) {...}
).So guess it's a problem with the auto injection? Unless I'm doing something wrong here..
The text was updated successfully, but these errors were encountered: