Loader Hooks · Issue #351 · nodejs/modules (original) (raw)
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:
- Bradley Farais' Resource APIs for Node and Using the Loader Hook API for require()
- Bradley Farais' RFC on per-package loader hooks issue #18233
- Myles' pluggable loaders issue Pluggable Loaders to support multiple use cases #82 - particularly Myles' draft
- Bradley Farias' blocked multiple --loaders PR #18914
- Geoffrey Booth's runtime loader transpilation feature issue Feature: Runtime loaders, transpilation at import time #96
- Geoffrey Booth's arbitrary module source text feature issue Feature: Arbitrary sources for module source text #97
edit (mylesborins)
here is a link to the design doc