Closed bhaskar-nair2 closed 3 years ago
How do I use this as a Nuxt plugin?
/plugins/vueIcon.js
import Vue from 'vue'
import feather from 'vue-icon'
Vue.use(feather, 'v-icon')
nuxt.config.js
export default {
// ...
plugins: [
{ src: '~/plugins/vueIcon.js' },
],
build: {
transpile: ['vue-icon'],
},
// ...
};
You can then use the component in any vue template without needing to import:
<template>
<div>
<v-icon name="arrow-up" />
</div>
</template>
How do I use this as a Nuxt plugin?