Minification and source maps

Topics: General
Oct 11, 2012 at 2:55 PM

The experimental source map support in TypeScript is A Good Thing, and I'm looking forward to seeing an update to, or plug-in for, IE10 that enables TypeScript debugging using these map files.

One thing I'm not clear on is how source maps work when there is more than one compilation step. For example, if I compile my app.ts file to app.js and app.js.map, and then minify my app.js file, is there a way to maintain the integrity of the source map through the minification step?

Coordinator
Oct 12, 2012 at 2:51 PM

As I understand it, the minifier would need to understand the source map format and update it for you.  There are a couple comments in the source map draft spec under "Multi-level Mapping Notes".