Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop visual studio generate typescript js and js.map files while publishing

I set up my project that combine javascript output into file to $(ProjectDir)dist\output.js and uncheck generate source maps.

Tools -> Options -> Text Editor -> Typescript -> Project -> Automatically compile Typescript files which are not part of a project is unchecked as well.

While building and running project from visual studio, it works as expected: generate only output.js files.

However while publishing my project, it still generates js and js.map file foreach .ts files.

When I check myproject.pubxml.user file, it says:

<File Include="app/app.module.js">
  <publishTime>06/16/2015 17:41:13</publishTime>
</File>
<File Include="app/app.module.js.map">
  <publishTime>06/16/2015 17:41:13</publishTime>
</File>
<File Include="app/app.routes.js">
  <publishTime>06/16/2015 17:41:13</publishTime>
</File>
<File Include="app/app.routes.js.map">
  <publishTime>06/16/2015 17:41:13</publishTime>
</File>
<File Include="app/controllers/account/loginController.js">
  <publishTime>06/16/2015 17:41:13</publishTime>
</File>

How can I stop Visual Studio from generating those unwanted .js and map.js files?

like image 607
asdf_enel_hak Avatar asked Jun 16 '15 22:06

asdf_enel_hak


1 Answers

However while publishing my project, it still generates js and js.map file foreach .ts files.

You probably have different config for debug and release. Make them the same.

like image 63
basarat Avatar answered Nov 17 '22 06:11

basarat