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

Vue 2.7 compatibility #285

Closed
JorisAerts opened this issue Jul 4, 2022 · 6 comments
Closed

Vue 2.7 compatibility #285

JorisAerts opened this issue Jul 4, 2022 · 6 comments

Comments

@JorisAerts
Copy link

JorisAerts commented Jul 4, 2022

Currently, the plugin does not work with Vue 2.7.
I get an error saying: Module not found: Error: Can't resolve '@vue/composition-api' in '[filename]'

@iceprosurface
Copy link

related to #284

@iceprosurface
Copy link

@sodatea Needs to be reviewed

@sodatea
Copy link
Member

sodatea commented Jul 5, 2022

I've merged the corresponding PR but I'm still not sure about how to expose the new option in the preset 🤔
https://twitter.com/haoqunjiang/status/1544307876943933443

@JorisAerts
Copy link
Author

JorisAerts commented Jul 5, 2022

I like your suggestion "target: 2.7", but it would imply somewhat that multiple choices are available, while 2.7 is the only version 2 ever which will support an internal composition api.

I suggested compositionAPI: "native" or compositionAPI: "module", or something like that.
Or "embedded" iso "native" would also work.

Or something like:
{ compositionApi: true } // 2.7
and
{ compositionApi: { module: false } } // 2.7
{ compositionApi: { module: true } } // < 2.7

@sodatea
Copy link
Member

sodatea commented Jul 6, 2022

Fixed in https://github.com/vuejs/jsx-vue2/releases/tag/v1.3.0

I didn't choose the module option because it's a little bit confusing in the context of JavaScript (module often refers to the module system, i.e. CJS or ESM).

Thanks for your suggestions anyway!

@sodatea sodatea closed this as completed Jul 6, 2022
@yihuan
Copy link

yihuan commented Jul 27, 2022

Is this fixed? I'm using v1.3.1 but I'm still facing this issue that the dependency @vue/composition-api was not found.

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

No branches or pull requests

4 participants