I normally import my components like so:
Vue.component('comments', require('./components/Comments.vue'));
But I wish to manually mount the .vue file depending on a condition. The docs state:
var MyComponent = Vue.extend({
template: '<div>Hello!</div>'
})
var component = new MyComponent().$mount()
document.getElementById('app').appendChild(component.$el)
But how do I mount a component in a separate vue file?