deno
2cc2cda0 - fix(ext/node): synthesize source for file:// at end of ESM hook chain

Commit
117 days ago
fix(ext/node): synthesize source for file:// at end of ESM hook chain The previous change returned `{ source: null }` at the end of the non-builtin load hook chain, which broke user hooks that `await nextLoad()` to obtain and transform source (e.g. pirates-style hooks in `test-module-hooks-load-esm.js`). Restore the synchronous file read for `file://` URLs at the terminal so user hooks observe a real source string, matching Node's `defaultLoad` behavior; non-file URL schemes still fall through to Rust default loading with the effective_url propagation introduced earlier.
Author
Parents
Loading