nodejs / import-in-the-middle

Like `require-in-the-middle`, but for ESM import
https://www.npmjs.com/package/import-in-the-middle
Apache License 2.0
72 stars 27 forks source link

Proxy default properties as well as named #42

Open jsumners-nr opened 11 months ago

jsumners-nr commented 11 months ago

This PR is a follow up to a discussion in Slack. As it is, IITM hooks will easily hook a "named" export from a CJS module but extra effort is required to hook the same exports that are defined on the "default" export. Prior to this PR, the lines 20 and 23 in the included test case will fail.

jsumners-nr commented 11 months ago

I'm not sure who to request a review from, but @bengl I am familiar with you, so: tag, you're it.