Ask questionsLoader Hooks
Hooking into the dependency loading steps in Nodejs should be easy, efficient, and reliable across CJS+ESM. Loader hooks would allow for developers to make systematic changes to dependency loading without breaking other systems.
It looks like discussion on this topic has died down, but I'm really interested in loader hooks and would be excited to work on an implementation! There's of prior discussion to parse through, and with this issue I'm hoping to reignite discussion and to create a place for feedback.
Some of that prior discussion:
here is a link to the design doc
Answer questions reasonablytall
Based on discussion in #386, to prevent blocking unflagging esm we should create a flag that enables the current (and future) experimental
I propose adding an
--experimental-loaders flag that enables the use of the
I also figure that
--experimental-loaders shouldn't be required when
--experimental-modules is set, thereby offsetting the need for a user to set
--experimental-loaders until esm is unflagged. I'd appreciate thoughts on that.
I'll have a PR for this by Friday, given no objections.