0

I have a service that imports some data. This file has a custom extension. So I'm doing this to import it:

import mydata from '../../assets/file.my-ext';

Typescript is giving me this:

'mydata' is declared but its value is never read.ts(6133)
Cannot find module '../../assets/file.my-ext' or its corresponding type declarations.ts(2307)

How can I fix this?

deszok
  • 145
  • 2
  • 14
  • 1
    Check [this](https://stackoverflow.com/questions/58149937/how-to-import-custom-file-types-in-typescript) ... please – Nalin Ranjan Jan 14 '22 at 17:03
  • 1
    You'll need to have a custom webpack configuration that loads files that are beyond the angular configuration. Try https://developapa.com/angular-custom-webpack-configuration/ maybe there is an example there for gif – misha130 Jan 15 '22 at 00:27

0 Answers0