Closed src-code closed 8 years ago
@src-code does the nodejs require function fallback to trying json files?
@defunctzombie Yeah, I believe so, based on this doc: https://nodejs.org/docs/latest-v0.12.x/api/modules.html#modules_all_together
great!
Thank you! :+1:
Addresses issue #69. Original code had a bug in it where it'd append a second
.js
extension if the path already had an extension, rather than appending the extension if the path didn't already have an extension.I also went ahead and added handling for
.json
as well, sincerequire.resolve()
does the same.