deno
9c0abbe5 - feat(node): add --experimental-loader CLI flag for Node.js compat

Commit
126 days ago
feat(node): add --experimental-loader CLI flag for Node.js compat Adds proper support for Node.js's --experimental-loader flag. When a child process is spawned with --experimental-loader, the flag is now passed through as a native Deno CLI flag instead of being converted to a fragile --import data URL. The implementation: - Adds --experimental-loader as a hidden CLI flag (with --loader alias) - Before the main module runs, eagerly imports each loader module and registers its resolve/load hooks via the existing async hook system - Handles top-level errors in loader modules with Node.js-compatible output (using util.inspect for objects/functions) - Updates node_shim translation to pass the flag through directly
Author
Parents
Loading