This reverts commit e3e0b79a3d3a622ec65a9c9509e8b5b12b01ff6e.
2835 was the first PR that was meant to introduce compatibility with Next.js. Unfortunately, it broke types outside of our repository. Our tsconfig.json has special flag, i.e. moduleSuffixes, which allows tsc to look for .native files first. Most of our users do not have this flag and they've run into ts problems, like this one:
'TextInput' refers to a value, but is being used as a type here. Did you mean 'typeof TextInput'?
Given that removing moduleSuffixes from tsconfig results in a bunch of errors (and there are more of them that we may not be aware of), we decided that it will be better to revert this change for now. It is not necessary since we only need it to support Next.js. At first I thought that #2873 may help, but unfortunately it doesn't.
Fixes #2889
Test plan
Check that web, Android and iOS work as they did before
Check that code from this comment now does not throw any errors
Description
This reverts commit e3e0b79a3d3a622ec65a9c9509e8b5b12b01ff6e.
2835 was the first PR that was meant to introduce compatibility with
Next.js
. Unfortunately, it broke types outside of our repository. Ourtsconfig.json
has special flag, i.e.moduleSuffixes
, which allowstsc
to look for.native
files first. Most of our users do not have this flag and they've run intots
problems, like this one:Given that removing
moduleSuffixes
fromtsconfig
results in a bunch of errors (and there are more of them that we may not be aware of), we decided that it will be better to revert this change for now. It is not necessary since we only need it to supportNext.js
. At first I thought that #2873 may help, but unfortunately it doesn't.Fixes #2889
Test plan