The API is equivalent to resolve for both
with the following exceptions:
Node's core modules are excluded.
The "main" file for a module is looked for first in a package.json's
property, then if
Otherwise, it will default to trying
Listed in order of priority, the following extensions are resolved instead of
MIT. See LICENSE.md for details.