doc, esm: correct default calls in loader examples
The default ESM functions load
and resolve
does require the context parameter, see:
-
defaultLoad
https://github.com/nodejs/node/blob/v18.9.0/lib/internal/modules/esm/load.js#L72-L100 -
defaultResolve
https://github.com/nodejs/node/blob/v18.9.0/lib/internal/modules/esm/resolve.js#L984
I found this because of nested dependency loading when I'm writing a custom loader, so I think we need to fix it in the document so other users don't have the same problem :)