preact-cli
preact-cli copied to clipboard
Refresh window on files change
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.
was unsure if it happens, but it happens indeed all the time
@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.
It seems like on my desktop ubuntu it is fine. While on my other laptop ubuntu it does the above. Will check it farther
It is my two users lol