How To Publish a Vue Component as an NPM Package

If you're like me, you have a handful of useful Vue components you use between different projects. Many times I've wanted to publish an individual Vue component to NPM for myself and others to access more easily.

When I've attempted this in the past, I've gotten tripped up on annoying little things with NPM and Webpack. I've since worked through those issues and have landed on a fairly simple workflow for turning something like UsefulComponent.vue into npm install vue-useful-component.

Checkout the following screencast to reveal this ancient hidden knowledge: