Open miclgael opened 1 year ago
As you can see on https://github.com/nuxt-modules/icon/blob/2cf77b302b55b97e6975286168281c4339e2e4e7/src/runtime/Icon.vue#L31
We use the component name so might not be possible to do so.
Is brand/MyIcon
actually named BrandMyIcon
in your project? If so, it could be possible 🤔
Thanks for the reply!
Taking a look at the code you have posted, I think we’d almost need a “path” prop, to “glue” the path to the component name. I’m just after a way to nicely organise custom SVG icons inside folders.
I use components: ["~/components","~/components/abc"],
inside nuxt config, now I can't use svg icons in global folder.
@ehsanonline you can use the object syntax:
components: [
{
path: '~/components/global',
global: true,
}
]
Hi there, thanks for the cool module.
I was wondering if it is possible to nest custom SVG icons inside folders?
Editing OP to make it more clear:
After some experimenting with the playground in the repo I understand the intended pattern now.
<Icon>
load an SFC that is nested in folders - that's easy:.svg
extension) that are organized in folders, you would currently need an individual.vue
icon to go along with every single one.This means you need to manage a folder of SVGs as well as their matching SFCs.
Is there a solution?