Resolve module path with custom entry point `package.json` field relative to caller file
npm install rsolveResolve module path with custom entry point package.json field relative to caller file.
``sh`
$ yarn add rsolve
`ts`
rsolve(id: string, fieldName: string) => Promise
`ts
import { rsolve } from 'rsolve'
console.log(
await rsolve('package', 'main')
)
console.log(
await rsolve('@scope/package', 'browser')
)
console.log(
await rsolve('../relative/path/to/package', 'react-native')
)
``