jacobmischka / gatsby-plugin-react-svg

Adds svg-react-loader to gatsby webpack config
https://www.npmjs.com/package/gatsby-plugin-react-svg
MIT License
69 stars 21 forks source link

Allow passing query params to react-svg-loader via config #30

Closed jackw closed 4 years ago

jackw commented 4 years ago

I'd like to be able to pass any of the query-params available from gatsby plugin to svg-react-loader from the loader config. From looking at the README and the source code I can't understand how this is done. From what I've understood I can pass certain params (e.g. filters) but not all options are catered for.

This PR adds the ability to use any of the query params available on svg-react-loader. It also adds some explanation on how to use this feature along with omitKeys prop.

jacobmischka commented 4 years ago

Looks great, but could you readd filters to acceptable props, and stick them into options if it exists? To avoid a breaking change for those using the existing filters option.

Thanks!

jacobmischka commented 4 years ago

Actually nevermind, I didn't realize the filters option was never even documented anyway. Thanks!

jacobmischka commented 4 years ago

Released in 3.0.0!

jackw commented 4 years ago

Thanks for releasing this! 🚀