jacobmischka / gatsby-plugin-react-svg

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

Unsupported in Gatsby v2 #7

Closed sarahannnicholson closed 6 years ago

sarahannnicholson commented 6 years ago

This plugin does not seem to be compatible with Gatsby v2.

The command gatsby develop works fine

But upon a gatsby build

 
The plugin "gatsby-plugin-react-svg@1.1.1" is exporting a variable named "modifyWebpackConfig" which isn't an API. Perhaps you meant to export "onCreateWebpackConfig"?

The Gatsby v1 docs has modifyWebpackConfig as a gatsby-node API Gatsby v1 node api docs The Gatsby v2 docs have changed it to onCreateWebpackConfig Gatsby v2 node api docs

jacobmischka commented 6 years ago

A v2-compatible build is currently published under the next tag! https://github.com/jacobmischka/gatsby-plugin-react-svg/pull/5

Will update to latest when gatsby v2 releases.

sarahannnicholson commented 6 years ago

My bad, I didn't check the closed tickets!

jacobmischka commented 6 years ago

No worries, I should have mentioned it in the readme earlier. I added a note there now!