-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Compatibility with the static build #26
Conversation
This pull request is being automatically deployed with Vercel (learn more). api-astroicon – ./packages/service🔍 Inspect: https://vercel.com/nmoo/api-astroicon/BMnqcqEP8Dij7iA2YsAY4YojaQfD astroicon – ./packages/www/🔍 Inspect: https://vercel.com/nmoo/astroicon/8AiBt2tr8BXk97Ex6fu4eWBeNzPb |
Unrelated to this change, but in 0.23 you get the <svg {...props} astro-icon={name}>{title ? (<title>{title}</title>) : ''}{innerHTML}</svg> |
Actually I think I got that. |
packages/core/lib/Icon.astro
Outdated
@@ -25,4 +25,4 @@ ${e}`) | |||
} | |||
--- | |||
|
|||
<svg {...props} astro-icon={name}>{title ? (<title>{title}</title>) : ''}{innerHTML}</svg> | |||
<svg {...props} astro-icon={name}>{title ? (<title>{title}</title>) : ''}<Fragment set:html={innerHTML}/></svg> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the correct way to do this. Let me know if not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, thank you! 🎉
Oh, smoke test isn't passing. Possible Vite related :/ I can take a look. |
I think this is related to Vite auto-externally dependencies, testing... |
Now that Vite has been upgraded in Astro, you can use it in astro-icon to gain support for the static build.
I believe this is equivalent to what was happening before and it's working in the
www/
app!Note that this would be a breaking change since it requires Astro 0.23, so you might want to do a prerelease (up to you of course).