Vue 3 external component/plugin loading in runtime

后端 未结 1 1979
渐次进展
渐次进展 2021-01-28 06:01

I am designing an architecture for the Vue 3 app with distributed module-based ownership. Module system will be represented with plugins (seems like the most approp

1条回答
  •  有刺的猬
    2021-01-28 06:43

    We solved this problem together via chat.

    Components built via the Vue 3 vue-cli rely on Vue being available in the global scope. So in order to render components loaded via the technique described in my article, you need to set window.Vue to a reference to Vue itself. Then everything works as expected.

    0 讨论(0)
提交回复
热议问题