Skip to main content

# Setup

# Installation

npm install -D axe-core vue-axe
# or
yarn add -D axe-core vue-axe
Copied!

# Usage

Add to your src/main.js

if (process.env.NODE_ENV === 'development') {
  const VueAxe = require('vue-axe').default
  Vue.use(VueAxe)
}
Copied!

# Nuxt.js

Create plugin file plugins/axe.js

import Vue from 'vue'

if (process.env.NODE_ENV === 'development') {
  const VueAxe = require('vue-axe').default
  Vue.use(VueAxe)
}

Copied!

In config file nuxt.config.js

...
plugins: [
  { src: '~/plugins/axe.js', mode: 'client' }
]
Copied!
Setup | Vue Axe has loaded