Watchify + tsify + Visual Studio == stale code

2019-08-02 20:11发布

We are running a Gulp task inside of Visual Studio (2015) to execute watchify. Works great some of the time, but sometimes watchify builds old code.

Repro:

  • Modify a .ts file in Visual Studio
  • Save
  • In the Task Runner Explorer, watch for watchify output, indicating that it ran (it does)
  • Refresh Chrome/clear cache (I use the "disable caching while debug window is open" option in Chrome)
  • View source in the Chrome Debugger (a little less than half the time, it will be the old code)

Any idea what I need to look for? Note that if I execute a full browserify build, Chrome always sees the new code -- this staleness problem only happens when Watchify is in the mix.

0条回答
登录 后发表回答