Snipcart wrote a nice tutorial on how to create Vue.js plugins that we can use for productions.

vue plugin tutorial

What exactly is a plugin? Plugins aren't something specific to Vue.js, and you'll usually find them in a large range of software. By definition, they indicate that an interface is provided to allow for extensibility.

In other, simpler words, they're a way to add global features to an app.

Demo

demo