Question: How to reuse the same .svg file in .vue and .liquid? #139
-
Hello. I need to render a svg component in liquid and vue. By default liquid has these icon snippets, but I think it's not possible to render liquid snippets within Vue components, right? So Im thinking to load .svg in both liquid snippets and vue components. Do you have suggestions about this? I know I can use renderless-component and render the icon via liquid. But in this case I need to use it as full vue component because the component is quite complex and dynamic. Much thanks before 🙏🏼 . |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I think the only way, without having duplicates, is to refactor the icons to vue components. That way they can be loaded in other vue files as well as in the liquid templates. |
Beta Was this translation helpful? Give feedback.
-
You can use SVG sprites |
Beta Was this translation helpful? Give feedback.
I think the only way, without having duplicates, is to refactor the icons to vue components. That way they can be loaded in other vue files as well as in the liquid templates.