jpkleemans/vite-svg-loader

svg file still in build dist

Closed this issue · 3 comments

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

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

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.

This is fixed in v3.0.0