Skip to content

add support for custom resolver

Compare
Choose a tag to compare
@iambumblehead iambumblehead released this 13 Oct 18:46
· 186 commits to main since this release
d3ca335

This release adds support for custom using a custom resolver. Specifically, a yarn PnP resolver can be passed to esmock, so that yarn PnP moduleIds can be resolved.

const modulePnP = await esmock('../src/parent.js', {
  '../src/PnPchild.js' : () => ['a', 'b']
}, null, {
  resolver: pnpapi.resolveRequest
})