If you attempt to require a directory, NodeJS has well-defined behavior: https://nodejs.org/api/modules.html#modules_all_together
- try to load dir/package.json and grab the main property, load the file pointed to by that.
- try to load dir/index.js as JS
- try to load dir/index.json as JSON
Trying this on Android and iOS, it just throws a runtime error that the requested module was not found.