jpkleemans / vite-svg-loader

Vite plugin to load SVG files as Vue components
MIT License
557 stars 59 forks source link

svg file still in build dist #26

Closed liuzw2579 closed 2 years ago

liuzw2579 commented 2 years ago

this plugin set enforce: pre, but svg file still handled by vite assets plugin if transform program move to load, seem to fix it

jpkleemans commented 2 years ago

Thanks for reporting. I'll fix this in the next version

anh-ld commented 2 years ago

Just coped with this problem.

Since vite auto import svg file by default see, I don't think there is a config in vite to avoid svg files in dist. The only way to fix it is to write a plugin to clean all svg files in close bundle hook.

jpkleemans commented 2 years ago

This is fixed in v3.0.0