How do do it...

We're assuming that you already have vue-cli installed in your terminal type:

    mkdir my-component    cd my-component    vue init webpack-simple

You will then be asked some questions; you can answer with whatever you like; at the end, you should be presented with something like this:

Install the dependencies and run the development server with the following commands:

    npm install    npm run dev

A browser should automatically open with a welcome page, such as the following screenshot:

Now any change you make in the source file will be ...

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.