You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module: use file: URL as sourceURL for type-stripped CommonJS
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: #63705
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
0 commit comments