const component = Vue.extend({ template: '

My view

' }) const extension = { activate (context) { context.subscriptions.push(hazel.views.register('example.view', () => ({ vm: null, el: null, create (parent) { this.el = new HTMLDivElement() parent.appendChild(this.el) this.vm = new component() this.vm.$mount(this.el) }, destroy () { this.vm.$destroy() this.el.remove() } }))) }, deactivate () {} }