How it works...

If you managed to follow along but some points were not so clear, that's probably because you are not too familiar with tools such as Webpack or NPM; in this case, not everything you do with them seems obvious. I refer you to Chapter 8Organize + Automate + Deploy = Webpack, for a close view of Webpack in particular.

It's probably useful to break down how the flow of data starts from the component we just wrote and goes down to index.html.

We have already seen how the main.js calls the component. The index.html looks like this:

<!DOCTYPE html> <html lang="en">   <head>     <meta charset="utf-8">     <title>my-component</title>   </head>   <body>     <div id="app"></div>     <script src="/dist/build.js"></script>   </body> </html>

So, there ...

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.