mmazzarolo / react-native-universal-monorepo

React Native boilerplate supporting multiple platforms: Android, iOS, macOS, Windows, web, browser extensions, Electron.
MIT License
1.7k stars 150 forks source link

Typescript webapp errors on non-web files #26

Closed ericlifs closed 2 years ago

ericlifs commented 2 years ago

First of all, sorry for the issue title but that was the most accurate thing I was able to write.

I'm porting my current monorepo to this awesome setup and I'm facing some new issues that I didn't have before. For some features, I have two different files (in the same folder) one called index.ts and index.web.ts and based on what react-native-web defines on their docs, it should read the *.web.ts on the web and the other file on the rest of the platforms.

This react-native-web feature was working fine before, but now I'm getting some typescript errors from the non web file on the web platform.

I'm not sure if there is something specific that needs to be done in order to enable this feature in this monorepo setup.

Thank you very much,

Eric.