esm: loader chaining
This is stage 1 of what I'm calling "Project: Make Loaders Usable". In future stages I will be working on such fun things as:
- Figuring out the
context
parameter of loader hooks - Auditing how hooks behave as part of chaining (for example, transformSource doesn't need to short circuit)
- Exploring APIs to allow non-chaining composition of loaders
- Loader threading
cc @nodejs/modules-active-members
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines