#Astro SVG Component

1 messages · Page 1 of 1 (latest)

gloomy coral
#

Hi! No, you don't need any frontend framework. In fact:

Your SVG component, like <Image /> or any other Astro component, is unavailable inside UI framework components, but can be passed to a framework component inside a .astro component.
see: https://docs.astro.build/en/guides/images/#svg-components

So in your case the error seems really... Are you sure your project uses the last version? Could you give us the output of npm run astro info? This could help to debug what's wrong here...

#

Hmm this is weird. If you run pnpm i, it's still 5.5.5?

#

Maybe you have a dependency that required that exact version so pnpm doesn't bump it... not sure. You could try pnpm dedupe. But no, I don't expect pnpm to cause issue...

#

🎉

#

I'm not sure exactly about the technical details... but when you import an SVG, it will create an Astro component that will output the svg code where you use it. So yes, I think saying it's inlining the svg is correct!

#

No problem, you too!