Closed OscarBarrett closed 4 years ago
How about adding an option to ignore some extensions?
So since next 9.3 and this change, next handles images coming from stylesheets and so only an exclude rule is needed to take over svg handling from next-images.
I can't think of another use case for ignoring specific issuers, so I'll mark this as closed. :+1:
Just a heads-up @OscarBarrett
I've resolved this and I'm sure a new version will release soon giving you the ability to choose the file suffixes that next-images
cares about.
Our use case: We want to use next-images for everything except SVGs. For SVG's we want to use a babel plugin to handle svg imports and include them directly into the rendered output.
Setting
exclude
to/\.svg$/,
works fine however we lose the ability to import SVG's in css/scss files entirely.At the moment we are adding the following to our webpack config:
Which works great, but it would be nice if this was configurable, such as:
Where all
extension
s would be combined into the exclude option for the main rule.If this is something you'd be happy to include, I can do up a PR.