nuxt-modules / svg-sprite

Optimize SVG files and combine them into sprite
https://codesandbox.io/s/github/nuxt-community/svg-sprite-module/
MIT License
301 stars 42 forks source link

fix: #307, #295, #298, #294 and add option to change component name #326

Open volkanakkus opened 1 month ago

volkanakkus commented 1 month ago

🔗 Linked issue

❓ Type of change

📚 Description

🐞 This PR includes the fixes #307, #295, #298, #294 (thanks to @AndriiGera) which you can access this PR: #309 ✨ And also adds ability to change component name with componentName key in the module options,

svgSprite: {
  componentName: 'MySvgIcon',
}

I've published an npm package by forking this package and including this PR. You can install it using npm install @volkanakkus/nuxt-svg-sprite, and add @volkanakkus/nuxt-svg-sprite to the modules section in your nuxt.config. You can use my package until this PR is merged.

If you only want the fixes (without component name feature) you can use @gvade/nuxt3-svg-sprite. See more in his PR: #309