Closed tdzhqixy closed 1 year ago
When I upgraded to svelte4, the component I referenced instead of displaying an icon was rendered to the page as below。
<script> import Icon from 'svelte-icon/Icon.svelte' import thumbUp from "$lib/asset/svg/thumb-up.svg?row"; </script> <div> <Icon data={thumbUp}/> </div
<div> <svg xmlns="http://www.w3.org/2000/svg" width="20px" height="20px" viewBox="0 0 20 20" stroke="currentColor" fill="currentColor">/src/lib/asset/svg/thumb-up.svg?row</svg> </div>
You have a typo there: ?row should be ?raw
?row
?raw
You are right. Thanks for the answer
When I upgraded to svelte4, the component I referenced instead of displaying an icon was rendered to the page as below。
Here's my reference to the component
This is the rendered result