Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.12 KB

installation.md

File metadata and controls

45 lines (31 loc) · 1.12 KB

Installation

Direct Download / CDN

https://unpkg.com/vue-router/dist/vue-router.js

Unpkg.com provides NPM-based CDN links. The above link will always point to the latest release on NPM. You can also use a specific version/tag via URLs like https://unpkg.com/[email protected]/dist/vue-router.js.

Include vue-router after Vue and it will install itself automatically:

<script src="/path/to/vue.js"></script>
<script src="/path/to/vue-router.js"></script>

NPM

npm install vue-router

When used with a module system, you must explicitly install the router via Vue.use():

import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

You don't need to do this when using global script tags.

Dev Build

You will have to clone directly from GitHub and build vue-router yourself if you want to use the latest dev build.

git clone https://github.com/vuejs/vue-router.git node_modules/vue-router
cd node_modules/vue-router
npm install
npm run build