Clarify paths with respect to package.json exports
justinfagnani opened this issue · 0 comments
justinfagnani commented
Paths in manifests are meant to be fully resolvable by tools. Without package exports tools can just look up files relative to the package root. But with package exports there are two complications:
- Paths should be resolved via the package exports, as opposed to the filesystem.
- Types stop having their own paths with TypeScript's export support. Instead they have a "types" export condition on the .js path they're associated with. This means a reference to a type needs to use the .js path and either needs to include the "types" condition, or tool needs assume it.