A plugin should only do one thing and do it well, eg, a word-count plugin:
module.exports = () => {
return {
type: 'component',
mountTo: '#footer-left',
component: {
render(h) {
const {wordCount} = this.$store.editor.tabs[this.$store.editor.currentTabIndex]
return h(
'span',
{class: 'word-count'},
wordCount
)
}
}
}
}