Resolve the path of a package regardless of it having an entry point
by sindresorhusJavaScript
Last 12 weeks · 4 commits
4 of 6 standards met
Repository: sindresorhus/resolve-pkg. Description: Resolve the path of a package regardless of it having an entry point Stars: 55, Forks: 6. Primary language: JavaScript. Languages: JavaScript (96.4%), TypeScript (3.6%). License: MIT. Latest release: v3.0.1 (3w ago). Open PRs: 0, open issues: 0. Last activity: 3w ago. Community health: 85%. Top contributors: sindresorhus, BendingBender, madjam002, Richienb.
We found out that this doesn't work with ESM modules. Do you have a similar package that works with ESM modules?
Given a package that has in its , like this: When trying to resolve that package, a error is thrown with Basically the assumption here that you can always resolve the of a package using node does not hold true anymore in this case. Still I'd like to be able to get the root path of that package, using node module resolution rules. 🤔