kazijawad/esbuild-plugin-svgr

Support Custom Filter

LandonSchropp opened this issue · 2 comments

Thanks for creating this plugin!

Is it possible to specify a custom filter for esbuild-plugin-svgr? In my use case, I want to import SVGs as React components, but only if they're contained in my images/icons directory. I'm new to ESBuild, so apologies if this is handled in their API.

Hey, sorry for the late reply — I'm not sure how I missed this! This plugin is a direct mapping to the @svgr/core package. So it only supports the options listed here. I currently don't see a way to specify an input directory, but this would be a question for the svgr team.

Closing this issue because of inactivity.