Caleb Porzio

How To Publish a Vue Component as an NPM Package

Nov 2018

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:

My Newsletter

I send out an email every so often about cool stuff I'm working on or launching. If you dig, go ahead and sign up!