JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.

Follow publication

How to Deploy your Vue.js App to Netlify

Donald K
JavaScript in Plain English
3 min readDec 6, 2020

--

<span>Photo by <a href=”https://unsplash.com/@billjelen?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCop

Photo by Bill Jelen on Unsplash

Introduction

Vuejs is a Progressive Javascript framework for building reactive and easily scalable websites

Netlify is a fast static web hosting platform that automatically redeploys your website when you push your to git repository

Prerequisites

Make sure you have the following:

Let’s deploy!

Create a new Vue project using Vue CLI and change to its directory

vue create vuejs-netlify
cd vuejs-netlify

Create a remote repo using GitHub CLI

gh repo create — public vuejs-netlify

Alternatively, you can create it on the GitHub website by going to https://github.com/new

Git push to the remote repo

git push -u origin master

Log Into your Netlify account

Click on New site from Git

New Site From Git Button

Connect to the Git Provider. In this case, GitHub

Connect To Git Provider

Pick the vuejs-netlify repository

Pick the vuejs-netlify repository

The master branch is the default branch to deploy from. However, you can deploy from any other branch

Add yarn build or npm run build as the build command. Running either of the commands will generate a dist folder where all the code is compiled

Therefore, add dist as the publish directory

Deploy the website by clicking Deploy site

Wait for the website to be deployed. This shouldn’t take too long as Netlify is a fast static web hosting platform

Open the website URL automatically generated

You’ve done it! You’ve deployed your Vuejs App! 🎊🎊🎊

Found a typo? Want to contribute? Here’s the Source Code

Follow me on Twitter for Blog updates and Great web development content

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Published in JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.

Written by Donald K

Software Engineer & Full Stack Web Developer

No responses yet

Write a response