jpkleemans / vite-svg-loader

Vite plugin to load SVG files as Vue components
MIT License
585 stars 61 forks source link

How to specify two sets of rules for svgs in different folders? #73

Closed Kasheftin closed 1 year ago

Kasheftin commented 1 year ago

Hi, there're two folders with svg files. One folder contains icons, colors and inline styles should be cleared up there (using removeAttrs and inlineStyles svgo plugins). Another folder contains big colored svgs, they should be served as files or loaded with vite-svg-loader without any plugins. How to write the vite's configuration for this case? How to restrict vite-svg-loader to process only files placed into some folder, and then add one more time with different options to process another folder?

jpkleemans commented 1 year ago

Hi, currently I don't think that's possible with vite-svg-loader. However, feel free to add a PR adding this feature to the plugin.