Complete Vue.js 2 Web Development_ Practical guide to building end-to-end web development solutions with Vue.js 2

(singke) #1
Organize + Automate + Deploy = Webpack Chapter 16

Now head to JSFiddle and pick Vue as a library. You can now add the link you copied in


the left and you have your component available to use:


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.


There's more...


In the Releasing your components to the public recipe in this chapter, you will learn how


to publish your component in the npm publish registry. We'll use a different approach than


this, but you'll find there the missing steps to publish it to the registry.

Free download pdf