Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh window on files change #1542

Open
prbxr opened this issue Mar 7, 2021 · 4 comments
Open

Refresh window on files change #1542

prbxr opened this issue Mar 7, 2021 · 4 comments

Comments

@prbxr
Copy link

prbxr commented Mar 7, 2021

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 prbxr closed this as completed Mar 7, 2021
@prbxr prbxr reopened this Apr 1, 2021
@prbxr
Copy link
Author

prbxr commented Apr 1, 2021

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

@developit
Copy link
Member

@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.

@lishine
Copy link

lishine commented Apr 13, 2021

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
Copy link

lishine commented Apr 13, 2021

It is my two users lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants