Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Vue CLI 3 Quick Start Guide

You're reading from   Vue CLI 3 Quick Start Guide Build and maintain Vue.js applications quickly with the standard CLI

Arrow left icon
Product type Paperback
Published in May 2019
Publisher Packt
ISBN-13 9781789950342
Length 200 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ajdin Imsirovic Ajdin Imsirovic
Author Profile Icon Ajdin Imsirovic
Ajdin Imsirovic
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Introducing Vue CLI 3 2. Webpack in Vue CLI 3 FREE CHAPTER 3. Babel in Vue CLI 3 4. Testing in Vue CLI 3 5. Vue CLI 3 and Routing 6. Using ESLint and Prettier in Vue CLI 3 7. Improving CSS with SCSS 8. Deploying Vue CLI 3 Apps on GitHub Pages 9. Other Books You May Enjoy

Adding a Vue project via NPM and using webpack with it

In this section, we'll build a new project with NPM, then add webpack to it, and finally add a Vue single file component to it.

First, let's make a new directory by taking the following steps. We'll call our project npm-vue-webpack:

  1. Open Git Bash and add a new folder as follows:
mkdir npm-vue-webpack && cd $_
  1. Initialize npm as follows:
npm init -y
  1. Next, install Vue and webpack into our new project as follows:
npm install vue webpack webpack-cli --save-dev --verbose

Once the NPM installation is complete, we can verify the folders and the contents of package.json as we did earlier in the chapter.

  1. Next, add the source and output folders our project will use as follows:
mkdir dist src
  1. Open our new project in VS Code as follows:
code .

Now, we can add two new files right from the VS Code editor...

You have been reading a chapter from
Vue CLI 3 Quick Start Guide
Published in: May 2019
Publisher: Packt
ISBN-13: 9781789950342
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime