In typescript(*.tsx)
files I cannot import svg file with this statement:
import logo from './logo.svg';
Transpiler says:[ts] cannot find module './logo.svg'.
My svg file is just <svg>...</svg>
.
But in .js
file I’m able to import it without any issues with exact the same import statement. I suppose it has something to do with type of svg file which must be set somehow for ts transpiler.
Could you please share how to make this work in ts files?