Skip to content

module: add sourceURL magic comment hinting generated source

Source map is not necessary in strip-only mode. However, to map the source file in debuggers to the original TypeScript source, add a sourceURL magic comment to hint that it is a generated source.

This has no runtime side-effects. --enable-source-maps will skip sources without sourceMappingURL magic comments since error stack remapping is not needed.

This improves debugger experiences like VSCode JS Debugger allowing setting breakpoints on the original typescript source files, instead of popping up the stripped source contents.

Merge request reports

Loading