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

Integration in Nuxt 3 #16

Open
toniengelhardt opened this issue Jan 6, 2023 · 1 comment
Open

Integration in Nuxt 3 #16

toniengelhardt opened this issue Jan 6, 2023 · 1 comment

Comments

@toniengelhardt
Copy link

toniengelhardt commented Jan 6, 2023

I have trouble getting it to work with Nuxt 3.

Should it not be registered in a plugin like:

import Cryptoicon from 'vue-cryptoicon'
import icon from 'vue-cryptoicon/src/icons'
import { defineNuxtPlugin } from '#app'

export default defineNuxtPlugin((nuxtApp) => {
  Cryptoicon.add(icon)
  nuxtApp.vueApp.use(Cryptoicon)
})

?

Screenshot 2023-01-06 at 19 05 21

@toniengelhardt
Copy link
Author

Update

The following seems to work:

import CryptoIcon from 'vue-cryptoicon/src/components/Cryptoicon'
import icon from 'vue-cryptoicon/src/icons'
import { defineNuxtPlugin } from '#app'

export default defineNuxtPlugin((nuxtApp) => {
  CryptoIcon.add(icon)
  nuxtApp.vueApp.component('CryptoIcon', CryptoIcon)
})

Adapted from #7.

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

1 participant