Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MichaelBrauner opened this issue Mar 22, 2020 · 0 comments

Comments

@MichaelBrauner
Copy link

MichaelBrauner commented Mar 22, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant