#Importing svg

1 messages · Page 1 of 1 (latest)

fringe bolt
#

Hi, I would like to import svg as component.
There is any loader or tsc plugin to do that ?

unborn glacier
#

I assume you mean a react component? does an img tag with a src pointing to the location of the svg file not work for you?

fringe bolt
#

Yes, like a react component

#

import ./mysvg doest work

fallow trellis
fringe bolt
#

Perfect thanks

fringe bolt
#

Get cannot find module ../assets/mysvg.svg or its corresponding type declarations