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

Icons do not appear on the page #39

Open
reinaldofox opened this issue Jan 23, 2024 · 2 comments
Open

Icons do not appear on the page #39

reinaldofox opened this issue Jan 23, 2024 · 2 comments

Comments

@reinaldofox
Copy link

In my project with Vite, Vue3/Composition API and Typescript the icons do not appear on the page.
Do I need some svg loader?

@alfaruqii
Copy link

hey i have the same problem (javascript), did you already find any solution?

@reinaldofox
Copy link
Author

hey i have the same problem (javascript), did you already find any solution?

Yep.
I did it this way.
In my components I did local import:

import { OhVueIcon as Vicon, addIcons } from "oh-vue-icons"
import { FaFlag } from "oh-vue-icons/icons"
addIcons(FaFlag)

And in the templates, just instantiate the icons you imported.

<template>
  <Vicon name="fa-flag"  />
</template>

This way it worked for me.

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