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

support multiple calls to addIcons ? #38

Open
idlethumbs opened this issue Jan 17, 2024 · 0 comments
Open

support multiple calls to addIcons ? #38

idlethumbs opened this issue Jan 17, 2024 · 0 comments

Comments

@idlethumbs
Copy link

I have a nuxt app using nuxt layers,
in the base app i have a plugin:

import { addIcons } from 'oh-vue-icons';
import * as bootstrapIconsKeyed from 'oh-vue-icons/icons/bi';

export default defineNuxtPlugin(_nuxtApp => {
  const bootstrapIcons = Object.values(bootstrapIconsKeyed);
  addIcons(...bootstrapIcons);
});

This imports all the bootstrap icons and they are available in my other apps that extend this layer.
However i had expected to be able to add more icons as and when required, in my child app i added another plugin:

import { addIcons } from 'oh-vue-icons';
import { RiVipCrownFill, Ri24HoursFill } from 'oh-vue-icons/icons';

export default defineNuxtPlugin(_nuxtApp => {
  addIcons(RiVipCrownFill, Ri24HoursFill);
});

but these icons are not available when used in my components,

I have also tried importing directly in components :

<script setup lang="ts">
import { addIcons } from 'oh-vue-icons';
import { Ri24HoursFill, FaAccessibleIcon } from 'oh-vue-icons/icons';

addIcons(Ri24HoursFill, FaAccessibleIcon);

is this behaviour supported some other way or am i doing something wrong?

apologies if this is not the correct place to raise this.

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