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
67 stars 24 forks source link

Proxy default properties as well as named #42

Open jsumners-nr opened 10 months ago

jsumners-nr commented 10 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 10 months ago

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