Closed lifeart closed 3 years ago
Hi @joeldenning! Tests added.
I'm little bit confised about this branch of code: https://github.com/single-spa/single-spa-vue/pull/84/files#diff-d3b89dd088913971f21ae339bd0ea76769602c03acb5d9e1efc116efe355bb28R155
there is no mounting and root assigment if we provide Vue as params, instead of createInstance hook.
Tests failed when run in Github action - please fix
there is no mounting and root assigment if we provide Vue as params, instead of createInstance hook.
Could you clarify what you mean here? I read the line of code you linked to but am not sure what you mean.
Sure, there is 2 branches of code:
and
in first one we have "mount call":
instance.root = instance.vueInstance.mount(appOptions.el);
and for second, there is no
wondering, will be auto-mounted somehow?
In Vue 3, you have to call createApp().mount()
, but in Vue 2 you just call new Vue()
to mount it. The first code path you shared is for Vue 3, the second code path is for Vue 2.
Documented in https://github.com/single-spa/single-spa.js.org/pull/472
usage:
resolves: https://github.com/single-spa/single-spa-vue/issues/83
refs: https://ssr.vuejs.org/guide/routing.html#code-splitting