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

Error thrown when using Vue Composition API in component library #239

Closed
willtpwise opened this issue Jan 28, 2020 · 2 comments
Closed

Error thrown when using Vue Composition API in component library #239

willtpwise opened this issue Jan 28, 2020 · 2 comments

Comments

@willtpwise
Copy link

I've noticed an issue with the Vue Composition API when used inside of a third party library.

The Vue Composition API throws an error when a component library (using the composition api) attempts to use one of the API methods (e.g. ref()).

[Vue warn]: Error in data(): "Error: [vue-composition-api] must call Vue.use(plugin) before using any function."

The consumer of the package using the Vue Composition API has already called Vue.use(CompositionAPI).

I've set up a reproduction of the issue below which should hopefully details the issue:
https://github.com/willtpwise/vue-comp-package

Related to:

@posva
Copy link
Member

posva commented Jan 28, 2020

This is the same problem as with linked packages (#228). The lib is using a copy of the library and it doesn't work

@posva posva closed this as completed Jan 28, 2020
@willtpwise
Copy link
Author

Thanks Posva. #228 helped solve the problem 👍

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

2 participants