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

Using TS absolute paths in import statement triggers an error in react-native

$
0
0

I am currently converting relative paths to absolute paths in my React-Native app and it triggers the following error:Error response to absolute import

And I have set up my tsconfig.json as follows:

{"compilerOptions": {"baseUrl": "./","paths": {"@buttons/*": ["src/components/buttons/*"]    },"jsx": "react","resolveJsonModule": true  }}

The following statement is how it looks in the file that I am importing it in:

import {CoreButton} from '@buttons/CoreButton';

Any ideas or suggestions would be amazing :)


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>