Live Edit not working with Typescript
This problem was brought up five years ago (https://intellij-support.jetbrains.com/hc/en-us/community/posts/207045175-Live-Edit-TypeScript-) and appears to have been rapidly dismissed, especially on YouTrack (https://youtrack.jetbrains.com/issue/WEB-9653). Rather than resurrecting that old post, I'm posting this new one. I am having this exact issue with the latest PhpStorm as of this writing, v2018.2.4.
TypeScript transpiling works flawlessly, as far as I can tell. Live Edit also works flawlessly, as far as I can tell--at least with standard HTML. Changes to JavaScript (and, by extension, any JS transpiled from TS) is not refreshing the Chrome browser window. And this is with the most basic of code, too:
document.getElementById('container').innerHTML = 'Replacing contents with this text.'
Where #container is the id of the only div element within the body element of a bare-bones HTML file. I will say, however, that I do sometimes get a console error message when starting up the debugging session for Live Edit:
"Error in event handler for (unknown): TypeError: Cannot read property 'trace' of undefined at browser.runtime.sendMessage.response"
This is probably related, but I'm not sure. Also, I can assure that there are no errors in the code itself. I'll gladly make a GitHub repo and post it here if you'd like to test it for yourself.
Please help me resolve this issue; it's really bugging me.
请先登录再写评论。
It would be more efficient to post this at bug tracker for the developers to take a look: http://youtrack.jetbrains.com/issues/WI#newissue=yes
Looks like I misunderstood how JS changes are viewed. After a bit more digging, I found this: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000083490-Live-Edit-doesn-t-update-with-external-js-file
So changes that occur only on page load do _not_ appear immediately, unfortunately; only on events and such. So my simple code in my initial post does not work. Kinda of a shame, I think.