In typescript(*.tsx) files typescript(*.tsx) I cannot import an 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 the .js file, I can import it without any problems with the exact same import operation. I believe this has something to do with the type of svg file that needs to be set up somehow for ts transpiler.
Could you share how to make this work in ts files?
svg typescript
Angryboy
source share