How it works...

Webpack configuration in the official templates is quite involved. On the other hand, don't try to understand everything straight away, or you will get stuck and not learn much anyway.

We created a UMD (Universal Module Definition) module that will try and see whether there is a Vue dependency available and install itself as a component.

You can even add CSS and styling to your component and, the way we configured Webpack, the styles will still ship with your component.

Get Vue.js 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.