# Installation

WARNING

Please make sure your Node.js version >= 8.6. There might be errors with lower versions.

# NPM

Installing with npm is recommended and it works seamlessly with webpack.

yarn (recommended):

yarn add vue-router-tab
1

npm:

npm i vue-router-tab -S
1

# CDN

Get the latest version from cdn.jsdelivr.net/npm/vue-router-tab (opens new window) , and import JavaScript and CSS file in your page.

<!-- import CSS -->
<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/vue-router-tab@1.2.5/dist/lib/vue-router-tab.css"
/>
<!-- import JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/vue-router-tab@1.2.5" />
1
2
3
4
5
6
7

RouterTab is also available on unpkg (opens new window).

# Dev Build

If you like to start with the dev version, clone it from GitHub, and build your own vue-router-tab.

git clone https://github.com/bhuh12/vue-router-tab.git node_modules/vue-router-tab
cd node_modules/vue-router-tab
yarn
yarn lib:build
1
2
3
4

# Polyfill

Vue Router Tab uses Vue CLI (opens new window) to build as library, so there's no polyfills.

If your project has to support browsers at lower versions, you can refer to the following configuration to transpile dependencies through Babel.

Reference: Vue CLI - Browser Compatibility (opens new window)

vue.config.js

module.exports = {
  transpileDependencies: ['vue-router-tab']
}
1
2
3
Last updated: 3/26/2021, 2:46:50 PM