Closed paul-soporan closed 3 years ago
This module is not a validator – it only resolves existing exports
mappings & returns what's defined.
Because the value is returned as defined (except subpatterns, which are evaluated), this is trivial to apply on the returned output string.
Thanks for the explanation! Perhaps you could put a non-goals section inside the README so that people know exactly which parts of the Node exports resolution ("resolution" might not be the best word as sometimes resolvers include validation and sometimes they don't) they have to implement themselves.
Node throws
ERR_INVALID_PACKAGE_TARGET
when a package target doesn't start with./
.resolve.exports
doesn't throw anything.Ref: