#Svg not included in Build

1 messages · Page 1 of 1 (latest)

idle ore
#

i have a line like this in a component of mine: <img class="nav-button" src="../assets/cross-small.svg" alt="X" />
the svg does not get copied to the dist folder on build, what could cause this?
note, i also do not have autocomplete on these...

#

can i tell vite to search for assets in .tsx files too?

#

ill try import now

#

YAY, that worked

#

but id prefer not to use this technique, as the asset urls are not bakds into the template of soild, i asume

hushed tartan
#

Is your project web based or targeting a mobile app?

#

If you are targeting web, then my preference is to put assets into public folder, whereas for mobile the assets will get managed differently. It’s just by default I don’t like my assets inlined into the js bundles