0.2.1 • Published 4 years ago

rsolve v0.2.1

Weekly downloads
132
License
MIT
Repository
github
Last release
4 years ago

rsolve npm

Resolve module path with custom entry point package.json field relative to caller file.

Install

$ yarn add rsolve

Usage

rsolve(id: string, fieldName: string) => Promise<string>
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')
)