TypeScript JavaScript Cache issue

我的未来我决定 提交于 2020-01-06 12:53:50

问题


I am using Visual Studio 2013 Update 1

I have written some code in TypeScript some days before, but most part of the code is commented.

Today, I uncommented that code and trying to debug JavaScript file.

The strange thing is that I am seeing commented code in generated dynamic JavaScript.

My guess is that TypeScript is bringing this code from Cache.

So, to clear this cache I have restarted Visual Studio, cleared Internet Explorer Browser Cache, done iisreset, restarted system... all the pains with no luck.

Not understanding how to solve the problem!


回答1:


I can see the same behavior in Visual Studio Code. It kind of caches the .ts files, so when I do a build using Ctrl+Shift+B it generates the .js file using the old .ts files. Restarting visual studio helps.




回答2:


TypeScript does not cache output.

Have you confirmed that any compilation is happening at all? Does the "modified" date on the .js file change?



来源:https://stackoverflow.com/questions/22843118/typescript-javascript-cache-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!