jpkleemans/vite-svg-loader

Support svg file exported from SVGator

Closed this issue · 1 comments

SVGator exports svg with script tags to do animation. When I import the svg in vite, it seems to omit the script tag in the svg file.

here is a sample file from SVGator https://1drv.ms/u/s!Ar0tMr5SCHnsjL9l3IHceXVWUhyIwQ?e=vY3X74

Hi, the Vue compiler removes all <script> code from the SVG file, so you need to add the animation code to the component yourself. See https://www.svgator.com/help/getting-started/add-animated-svg-to-vue-js.