You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In dev mode currently, if you open a page while offline, the page reloads once you are back online. The reload is caused by @vite/client that polls the Vite server every 1 sec and performs a full page reload as soon as the server becomes available.
Describe the solution you'd like
There are two options at least:
Ask the Vite team for an API in @vite/client that we could use to control the polling process.
When @vite/client is requested offline, patch it up on a fly by the service worker such that it won't poll the service in this case.
vursen
changed the title
[Vite] A page reload happens when you go online on a page that was opened offline in dev mode
[Vite] A reload occurs when you go online on a page that was opened offline in dev mode
Feb 22, 2022
vursen
changed the title
[Vite] A reload occurs when you go online on a page that was opened offline in dev mode
[Vite] If you open a page while offline, the page reloads once you are back online
Feb 22, 2022
Describe your motivation
A follow-up to #12928, #12383
In dev mode currently, if you open a page while offline, the page reloads once you are back online. The reload is caused by
@vite/client
that polls the Vite server every 1 sec and performs a full page reload as soon as the server becomes available.Describe the solution you'd like
There are two options at least:
@vite/client
that we could use to control the polling process.@vite/client
is requested offline, patch it up on a fly by the service worker such that it won't poll the service in this case.A related ticket in the Vite repo: vitejs/vite#6791
The text was updated successfully, but these errors were encountered: