Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Typescript throwing an error regarding the absolute imports if the file is unused

$
0
0

I have the following tsconfig.json file:

{"extends": "../../tsconfig.json","compilerOptions": {"esModuleInterop": true,"jsx": "react-native","baseUrl": ".","paths": {"@/*": ["./src/*"]    }  },"include": ["./*", "@types"],"exclude": ["node_modules", "babel.config.js", "metro.config.js", "jest.config.js"]}

And when I use the absolute imports, they work well only if the exported file that is using the absolute path is being used/referenced somewhere.Is there anything that I can set up in the config file to be able to recognize the paths even if the file is not being referenced anywhere yet?


Viewing all articles
Browse latest Browse all 6287

Trending Articles