The CommonJS loader was passing the bare filesystem path as the `//# sourceURL` comment of type-stripped TypeScript, this leads to two problems: 1. It reports hasSourceURL = false if the path contains any whitespaces as this breaks V8's magic comment parser. 2. The inspector would incorrectly report a file path verbatim as the script's URL. Pass the module's file: URL as the sourceURL so the reported URL is consistent across loaders and won't lead to an issue in inspector clients that actually except a real URL for the scripts. Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com> PR-URL: https://github.com/nodejs/node/pull/63705 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> |
||
|---|---|---|
| .. | ||
| cjs | ||
| esm | ||
| customization_hooks.js | ||
| helpers.js | ||
| package_json_reader.js | ||
| run_main.js | ||
| typescript.js | ||