Skip to content

esm: fallback to `readFileSync` when `source` is nullish

When using the Modules Customization Hooks API to load CommonJS modules, we want to support the returned value of defaultLoad which must be nullish to preserve backward compatibility. This can be achieved by fetching the source from the translator.

Fixes: https://github.com/nodejs/node/issues/50435

Merge request reports

Loading