rsolve
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

rsolve npm

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

Install

$ yarn add rsolve

Usage

rsolve(idstring, fieldNamestring) => 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')
)

Readme

Keywords

Package Sidebar

Install

npm i rsolve

Weekly Downloads

86,473

Version

0.2.1

License

MIT

Unpacked Size

2.94 kB

Total Files

5

Last publish

Collaborators

  • deepsweet