I am importing an Icon using the following code:
import Icon from "!svg-react-loader?name=Icon!../images/svg/item-thumbnail.svg"
In Visual Studio Code 1.25.1 I get the following warning from tslint:
[ts] Cannot find module '!svg-react-loader?name=Icon!../images/svg/item-thumbnail.svg'.
I still get this warning even if If I apply a tslint ignore statement:
// tslint:disable-next-line:no-implicit-dependencies
The import works fine (i.e. WebPack builds the bundle with no errors), though I'd really like to get rid of this warning. Any ideas how to do so?
To solve this issue create file in the root of your repository
types/images.d.ts
with following contents: