resolvewithplus
[
resolvewithplus iterates on the resolvewith package for resolving CJS modules following the original node.js spec. resolvewithplus is changed to an ESM module and adds support for ESM import 'name'
resolutions.
When a package exports both ESM and CJS, resolvewithplus
returns the ESM path (tries to). Resolving ESM paths is complex and ESM support will be lacking for edge-cases.
resolvewithplus('koa', '/Users/bumble/resolvewith/test/');
resolvewithplus('./testfiles/testscript.js', '/Users/bumble/resolvewith/test/')
resolvewith('koa', '/Users/bumble/resolvewith/test/');
resolvewithplus caches and reuse results it generates. The first call follows rules to locate the file. Subsequent calls using the values return reults from a key store.