So it turns out there was a good reason to not use the lib/typescript parts of react-native-paper in that those look to be only the type definitions and not the implementation, which meant that at build/run time it failed to import correctly. This changes some of them to lib/module (which is the actual compiled code) and then tells TypeScript where to look for the type definitions for those files by modifying the paths in tsconfig.json. Note that in the docs they recommend against using paths to point into node_modules, but that seems to be when referring to an entire package and some of the issues they're warning about there don't seem to be coming up here (eg other aspects of the package.json being ignored).
Also mark yarn.lock as generated, since I've been wanting that for a bit and it's a small change
So it turns out there was a good reason to not use the
lib/typescript
parts ofreact-native-paper
in that those look to be only the type definitions and not the implementation, which meant that at build/run time it failed to import correctly. This changes some of them tolib/module
(which is the actual compiled code) and then tells TypeScript where to look for the type definitions for those files by modifying thepaths
intsconfig.json
. Note that in the docs they recommend against usingpaths
to point intonode_modules
, but that seems to be when referring to an entire package and some of the issues they're warning about there don't seem to be coming up here (eg other aspects of thepackage.json
being ignored).Also mark yarn.lock as generated, since I've been wanting that for a bit and it's a small change