gatsby-plugin-react-svg icon indicating copy to clipboard operation
gatsby-plugin-react-svg copied to clipboard

This plugin works fine in development mode - but on prod it behaves different.

Open MichaelBrauner opened this issue 5 years ago • 0 comments

Like the title said - in dev mode its completly fine.:

Works fine

But when I build gatsby and serve it it looks like that:

Works not

The Code:

import Facebook from "-!svg-react-loader?props[]=className:w-10 h-10!./../images/icons/icon-facebook-drawn.svg"

<Facebook/>

I think It has something to do with the fact that I import all the svg's and then I dont use all of them. I will only use instagram, when the use inserted an instagramaccount in the backend.

So I guess gatsby-plugin-react-svg loads all svgs and wants to use them all - so it pushes the missing ones to the existing ones.

Can this be right?

MichaelBrauner avatar Mar 22 '20 14:03 MichaelBrauner