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

SVGs not rendered properly in SSR (nuxt.js) #98

Open
ryanrca opened this issue Oct 16, 2019 · 5 comments
Open

SVGs not rendered properly in SSR (nuxt.js) #98

ryanrca opened this issue Oct 16, 2019 · 5 comments

Comments

@ryanrca
Copy link

ryanrca commented Oct 16, 2019

I have a few svgs that render perfectly when running nuxt.js in dev mode. They look like this:

image

When built with Nuxt using SSR, they render like this:

image

What are we doing wrong?

@damianstasik
Copy link
Owner

Have you found a solution? If no, could you share those SVGs here?

@shivgarg5676
Copy link

I am facing the same issue as well. In my production build style tags are getting stripped from the svg defs. Whereas development builds are working fine.

@EderOBarreto
Copy link

@shivgarg5676 Did you find a solution? I passing through the same problem. :(

@alanaasmaa
Copy link

I manually inlined the styles.

@Tofandel
Copy link

Tofandel commented Jun 29, 2020

It's an issue with SVGO svg/svgo#1077
Try setting options: { svgo: { plugins: [{inlineStyles:{onlyMatchedOnce: false} }] } } or options: { svgo: { plugins: [{minifyStyles:false}] } } to vue-svg-loader and see if that solves the issue

If not and your svg is already optimized (which IMO it should be) you can set options: { svgo: false }

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

6 participants