preact-cli icon indicating copy to clipboard operation
preact-cli copied to clipboard

Refresh window on files change

Open prbxr opened this issue 3 years ago • 4 comments

When using preact watch of preact-cli 3.0.4, ubuntu, chrome latest All the time I have used preact-cli in the past half year, on file change, the window will refresh only when the browser gets into view. It happens most of the time. I am used to different flow - to save the file in the editor and by the time I switch to the browser, it will be refreshed because it started to refresh on file save. Is it some webpack flag ? Apparently it senses browser visibility event and only on this event triggers refresh.

prbxr avatar Mar 07 '21 13:03 prbxr

was unsure if it happens, but it happens indeed all the time

prbxr avatar Apr 01 '21 18:04 prbxr

@prbxr is your Chrome running in a different virtual desktop or workspace? Chrome throttles backgrounded tabs, which includes things requestAnimationFrame and timers - perhaps the in-browser portion of Webpack is using a timer to defer HMR updates, and that timer is being throttled. There are some options for tab throttling in chrome://flags that may be worth checking.

developit avatar Apr 13 '21 21:04 developit

It seems like on my desktop ubuntu it is fine. While on my other laptop ubuntu it does the above. Will check it farther

lishine avatar Apr 13 '21 21:04 lishine

It is my two users lol

lishine avatar Apr 13 '21 21:04 lishine