I have a project with a directory structure like this:
.
- /app
- /web
app
is a react native app (created manually, not with create-react-native-app
).
web
is a react app created using create-react-app
.
Both use TypeScript.
I'm trying to render a component from app
in the web
application using react-native-web
, but TypeScript doesn't seem to be parsing the file as I get this error:
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
> export type Props = {
Given that TypeScript is working fine within app
and web
independently, I'm not sure what I'm missing. One slight quirk of the project is that, because create-react-app
doesn't allow relative imports from outside its own src
folder, I've had to symlink app
using npm link app
in the web
directory in order to import the app components.
Not sure if that's causing the problem, but I'm pretty stumped so any suggestions would be greatly appreciated.