Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Stop VS 2013 from Generating TypeScript Map Files

Does anyone know how to stop VS 2013 from generating *.map files for TypeScript?

We're not such a big fan of them since they:

  • Tend to fall out of sync with actual javascript source
  • Stop the ability for you to do edit/continue debugging in tools like Chrome Developer Tools

I can delete them with a post build step, but the javascript that gets generated still has a:

//# sourceMappingURL=someFile.js.map

Which makes the browser look for the map files (generating a 404). Even if we try to build a project that has TypeScript in Release mode it still generates JS with references to map files.

Anyway to stop the pain?

like image 750
Tyler Avatar asked Mar 05 '14 23:03

Tyler


1 Answers

In the TypeScript project properties, go to "TypeScript Build" (available starting with TS 0.9.5) and deselect "Generate source maps".

like image 61
ulrichb Avatar answered Nov 12 '22 06:11

ulrichb