Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuxt Support #15

Closed
bhaskar-nair2 opened this issue Jan 30, 2021 · 1 comment
Closed

Nuxt Support #15

bhaskar-nair2 opened this issue Jan 30, 2021 · 1 comment

Comments

@bhaskar-nair2
Copy link

How do I use this as a Nuxt plugin?

@dvns
Copy link

dvns commented Jun 10, 2021

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants