typescript-compile icon indicating copy to clipboard operation
typescript-compile copied to clipboard

Source Maps

Open redswoop opened this issue 13 years ago • 3 comments

Would it be possible to run the compiler with the equiv of -sourcemaps, and then somehow store that output in a way that the source map URL would be able to refer back to sourcemap content without having to do a actual URL fetch? (i.e. base64 encoding the sourcemap and using it as the sourcemap URI?)

redswoop avatar Nov 09 '12 18:11 redswoop

Aha! Source Maps can actually be expressed as inline data url's.

redswoop avatar Nov 09 '12 18:11 redswoop

I don't know if the original TS compiler in typescript.js can generate sourcemaps, and even if it can, it will definitely decrease performance. And where should the sourcemaps be stored?

Personally, I think that the outputted JS code is readable enough and can be easily tracked in any inputted TS file.

niutech avatar Nov 16 '12 15:11 niutech

Typescript now supports source mapping. Sure, you can easily debug without mapping. This takes time and is tedious. Engineers don't like tedium. (or at least they shouldn't)

matthewoates avatar Sep 23 '13 19:09 matthewoates