Installing Vue.js
Let's get started with the installation of Vue.js. There are three ways to install and use Vue.js.
Including it in a script tag
The easiest way to use Vue.js is to download it and include it in your script
tag. You can download it from https://cdn.jsdelivr.net/npm/vue:
<script type="text/javascript" src="vue.js"></script>
Using Content Delivery Network (CDN) links directly
CDN is a network of distributed servers. It stores the cached version of contents in different geographical locations so that the content loads faster when fetched. We can use the CDN link directly in our script
tag:
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vue.js"></script>
Using Vue.js as an npm package
npm
also has a package for vue
, which can be installed as follows:
$ npm install vue