Too much duplicated characters if use a same svg icon many times in one page
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 96
- Avg merge
- 8h 12m
- Merged PRs (30d)
- 2
Description
This nuxt-icon module works well in my nuxt3 project, but I found a small problem:
I have 100 pictures on my home page, then I put such as 'edit' icon and 'love' icon on every pictures , which turn out to be many duplicated characters on the page because of the path of every svg is very long but they are same <path>.
Could it be possible to use <use> to resolve that problem for ssr when building?
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 by tracing how the Nuxt icon module renders repeated SVG icons during SSR, especially how each icon's path is serialized into the page. Determine whether repeated paths can be referenced with while preserving the existing icon output. Done means repeated identical icons no longer duplicate the long path data in the SSR-rendered page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100