Load SVG in Svelte #13094
kresnasatya
started this conversation in
Show and tell
Load SVG in Svelte
#13094
Replies: 1 comment 2 replies
-
Hi, thanks for sharing! What is wrong with simply changing the Extension from .svg to .svelte? That also enables you to set any attribute on the svg element avoiding the need for a wrapping div aswell as all the css variables. Additionally, you do not get treeshaking in your solution. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone, I would like to share my personal code sample how to load SVG in Svelte (e.g. you load icons and usually use them beside the menu). The personal code store in GitHub repo: senkustream/svg-in-svelte. No, any third party plugin by the way.
If you like the summary you can visit to this site: https://learn.kresna.me/programming/svelte.
Good luck and have fun!
Beta Was this translation helpful? Give feedback.
All reactions