Closed gregorskii closed 5 years ago
Also one would use it as such, I can PR/add some docs once you check it out:
{
resolve: `gatsby-plugin-react-svg`,
options: {
rule: {
include: /images\/.*\.svg/,
omitKeys: ['xmlnsDc', 'xmlnsCc', 'xmlnsRdf', 'xmlnsSvg', 'xmlnsSodipodi', 'xmlnsInkscape']
///OR
filters: [function(value) { console.log(value); }]
}
}
},
Looks great, thanks so much!
Provides solution for #10.
updates config to allow options to be passed, and parsed through ruleProps then applied correctly to use loader config specifically plucks includes, excludes, filters, and new key omitKeys to be used to setup svg-react-loader config since filters are quite complex adds a simple key 'omitKeys' to allow end users to quickly remove keys that are problematic from their svg files lets filters remain in place if they are passed in directly allows config to define its own filters per the docs