score:0

i have face the same issue before with typescript.

create a file named custom.d.ts in ./src with the following content:

declare module "*.svg" {
  const content: any;
  export default content;
}

add the custom.d.ts to tsconfig.json as below you will find this tsconfig.json file in your project root folder.

"include": ["src/components", "src/custom.d.ts"]

source: https://webpack.js.org/guides/typescript/#importing-other-assets

hope this will resolve your issue.


Related Query

More Query from same tag