Feature request: A way to manage custom SVGs that are nested inside folders.
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 96
- Avg merge
- 8h 12m
- Merged PRs (30d)
- 2
Description
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.
- Default pattern
// Assuming: `components/global/MyIcon.vue`
<Icon name="MyIcon" />
- If you want to have
<Icon>load an SFC that is nested in folders - that's easy:
// Assuming: `components/global/CoolStuff/MyIcon.vue`
<Icon name="CoolStuffMyIcon" />
- However, if you have an elaborate set of custom icons (
.svgextension) that are organized in folders, you would currently need an individual.vueicon to go along with every single one.
// Assuming: `{public|assets}/icons/brand/MyIcon.svg
// Assuming: `components/global/icons/brand/MyIcon.vue`
// Assuming: `{public|assets}/icons/brand/MyOtherIcon.svg
// Assuming: `components/global/icons/brand/MyOtherIcon.vue`
<Icon name="IconsBrandMyIcon" />
<Icon name="IconsBrandMyOtherIcon" />
// etc.
This means you need to manage a folder of SVGs as well as their matching SFCs.
Is there a solution?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the repository playground and trace how nested SFC names and custom SVG icons are discovered and resolved. Define completion as allowing SVGs in nested folders to load through without requiring a matching Vue SFC for each file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100