Add a requireDir.resolve() which would return a map of the paths instead of a map of the required paths.
It would help plugins like browserify to follow your requires, without loosing time loading unnecessary modules.
I chose the name .resolve() to stay consistent with require.resolve().
Add a
requireDir.resolve()which would return a map of the paths instead of a map of the required paths.It would help plugins like browserify to follow your requires, without loosing time loading unnecessary modules.
I chose the name
.resolve()to stay consistent withrequire.resolve().