Unable to import tsx file into index.js
AntonPuko opened this issue · 1 comments
AntonPuko commented
Hi, sorry if I'm asking something stupid. But does this work with the latest rn?
I stuck with very basic :(
- I installed fresh new project with react-native init. (react-native 0.49.5)
- added react-native-typescript-transformer, typescript
- added rn-cli.config.js
- added tsconfig:
{
"compilerOptions": {
// "allowJs" true, //was trying this also
"target": "es2015",
"jsx": "react",
"noEmit": true,
"moduleResolution": "node",
},
"exclude": [
"node_modules"
]
}
- setup project structe as:
--src
----App.jsx
--index.js - in index.js I'm trying to import App as:
import App from './src/App';
And when I'm building the app with yarn start
I get the error:
Unable to resolve module
./src/App`
So, I just can't import my component jsx into root index.js file.
I can provide the repo, but I think the screen represents all the info:
AntonPuko commented
nevermind, I'm an idiot I messed tsx with jxs :face_palm: , need to get some sleep.