Project: titanium
Issue TIMOB-23382: Parity: Cannot require directory as done in NodeJS
If you attempt to require a directory, NodeJS has well-defined behavior: https://nodejs.org/api/modules.html#modules_all_together Namely: - 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.
Story points: 8