Creating a clean Webpack project

Create a new directory and a new Vue project inside it with the following command:

vue init webpack

You can choose the default values for the questions asked.

Run npm install to install all the required dependencies.

Then, navigate to src/App.vue in the directory structure and delete pretty much everything inside the file.

The final result should be as follows:

<template>  <div id="app">  </div></template><script>export default {  name: 'app'}</script><style></style>
I've already done this for you, and, you can use another template with the following command instead: vue init gurghet/webpack

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.