Vue 2.7.15
Vue 3.3.4
Vite 4.4.5
Node 16.14.0
NPM 8.3.1
`Vue.extend` to `createApp`
In Vue 2 if you want to extend a component Types.vue
proxy.$el
in Vue 2 restricts to one child element. When you append a child to a parentNode
, would be easy: parentNode.appendChild(proxy.$el)
to Vue 3
proxy.$el
in Vue 3, has HTMLElement
(single child) or Text
(multiple children). Would appending proxy.$el
more challenging.
const parentNode = document.createElement('div')
// Add Extended Vue Module to parentNode
appendChild(parentNode, proxy.$el)
Advanced mounting
Use 'vue/dist/vue.esm-bundler'
instead of 'vue'