Closed pimlie closed 4 years ago
Can You please elaborate what is the use case of this PR. What problem it solves?
Avoiding errors when there's delayed mounting?
Is there use case that can be maybe solved other way?
I've created a module/wrapper to use a Nuxt SPA as a custom element. Although it seems to work fine already, Nuxt does some extra initialization between creating the Vue instance and mounting the instance. To prevent any differences in behaviour I'd like to stay as close as possible to the default Nuxt implementation, hence this pr.
Merged and released in https://github.com/karol-f/vue-custom-element/releases/tag/v3.2.10
Damn you are fast, it must be a new Github record from pr to review to release! Many thanks ;)
Hmm, could you please verify if the npm publish was succesfull? It could also be that the npm cache is bogging again, but the 3.2.10 release is not yet listed: https://www.npmjs.com/package/vue-custom-element
Checking...
Done, sorry for the inconvenience.
This pr supports delayed mounting of the Vue app by returning the root Vue instance in
getVueInstance
if no children exists yetThis makes the following possible: