vite-plugin-svg-sprite icon indicating copy to clipboard operation
vite-plugin-svg-sprite copied to clipboard

vite-plugin-svg-sprite is not working as expected

Open congcuongcntt opened this issue 10 months ago • 1 comments

I am facing an issue where vite-plugin-svg-sprite does not seem to be working correctly in my project. I have followed the setup instructions from the documentation, but the plugin is not generating the expected sprite file or processing my SVG files. vite.config.js import createSvgSpritePlugin from 'vite-plugin-svg-sprite'; export default defindConfig({ createSvgSpritePlugin({ symbolId: 'icon-[dir]-[name]', exportType: 'vanilla', include: 'assets/styles/images/svg/**/*.svg', }), }); svg folder: ./assets/styles/images/svg/folder/*.svg

vue component <svg> <use xlink:href="#icon-facebook" ></use> </svg> It seems that the plugin is not building the SVG behind the body.

congcuongcntt avatar Jan 24 '25 09:01 congcuongcntt

@congcuongcntt Could you create a playground: https://stackblitz.com/edit/vitejs-vite-pyvxwn ?

meowtec avatar Jan 25 '25 05:01 meowtec