Within a monorepo, we use extension of TS config via local files and a sharable node module. This allows the editor and tsc to type-check using project references etc, and for config to be kept consistent. The same mechanism for config extension is not supported by Metro (via babel), nor by react-native-typescript-transformer, so React Native sub projects cannot be compiled in the same manner at the moment.
Appreciate that this project is being superseded by the babel TS support, but as Metro only just introduced that, we and many others are still compiling via react-native-typescript-transformer. Therefore decided to fix it here first, to buy more time (as a fix will be needed for config extension in babel too)
Solution supports:
Can extend via absolute path, relative path, node module reference, and sub node module reference
The problem:
Within a monorepo, we use extension of TS config via local files and a sharable node module. This allows the editor and
tsc
to type-check using project references etc, and for config to be kept consistent. The same mechanism for config extension is not supported by Metro (via babel), nor by react-native-typescript-transformer, so React Native sub projects cannot be compiled in the same manner at the moment.Appreciate that this project is being superseded by the babel TS support, but as Metro only just introduced that, we and many others are still compiling via react-native-typescript-transformer. Therefore decided to fix it here first, to buy more time (as a fix will be needed for config extension in babel too)
Solution supports:
Examples