My attempt to make a less annoying require.resolve for Node.js v12+.
This module exports one function:
Returns the resolve
function described below,
based on rqr
which should be the calling module's require
function.
Find the absolute path of module id
.
- Even if it's
pkg-name/package.json
andpkg-name
'spackage.json
defines custom exports that don't include an export namedpackage.json
.
- Needs more/better tests and docs.
-
resolve-package-path
: Also reliably finds apackage.json
even with custom exports, but v3.1.0 seems to prefer the global version over the project-local version of same-named dependencies. (This might be intended behavior, see their docs.)
ISC