single-spa / single-spa-vue

a single-spa plugin for vue.js applications
MIT License
182 stars 42 forks source link

fix: mount vue3 instance if no handleInstance is provided #87

Closed Lalaluka closed 3 years ago

Lalaluka commented 3 years ago

Hi,

84 introduced a breaking Problem for Vue3 MFEs.

The if Statement was wrapped around the full Statement and didn't apply instance.root = instance.vueInstance.mount(appOptions.el); if handleInstance is not present. So MFEs based on Vue3 without handleInstance using single-spa-vue@2.5.0 always broke. They would load and populate the dom initially but the vue instance would never be executed correctly.

I noticed that because newly created vue3 MFEs just didn't work. They would start and the Browser wouldn't show any Errors but the page would stay empty.

joeldenning commented 3 years ago

Released in https://github.com/single-spa/single-spa-vue/releases/tag/v2.5.1