-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Web Component] Use plugins inside Web Component #9562
Comments
What's the use case for turning a Vue component into a web component that only works in a Vue app (because it relies of vue-router, pinia, or similar)? |
It can be used outside a vue app. Here is my use case: When bundled, my application have all necessary deps in only one JS file in order to works; Vue, pinia, vue-router, CSS... |
Ah, so you want to essentially encapsulate a complete Vue app as a single web component. I think we do have such a request in the backlog already, need to look it up. Edit: Duplicate of #4635, essentially. Would you agree? |
Oh yes, sorry for the duplicate :( Yes, totally agree 👍 EDIT: Currently I have my workaround to implement the use case but I have some problems depending on the plugin used. I will try to use the gist defined in the ticket and see if it fix my problem for the moment. |
closing in favor or the original issue. |
Vue version
3.3.4
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-k5r83k
Steps to reproduce
What is expected?
Have a way to use plugins (like
pinia
,vue-router
or any other) inside Web Component.What is actually happening?
getCurrentInstance().appContext.app
isnull
.System Info
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: