elastic / require-in-the-middle

Module to hook into the Node.js require function
MIT License
168 stars 26 forks source link

feat: add named 'Hook' export #64

Closed trentm closed 1 year ago

trentm commented 1 year ago

Also prefer this form. This is because it is, apparently, easier to type for and use named exports with TypeScript and ESM, rather than "default exports".

Refs: https://github.com/open-telemetry/opentelemetry-js/issues/3701

trentm commented 1 year ago

The assumption is that this will resolve https://github.com/open-telemetry/opentelemetry-js/issues/3701 -- though I wasn't able to reproduce the exact case.