vite icon indicating copy to clipboard operation
vite copied to clipboard

feat(client): ping from SharedWorker

Open sapphi-red opened this issue 1 year ago • 1 comments

Description

No more log spamming with WebSocket connection to * failed: 🙂

I came up with an idea to eliminate the WebSocket pinging in the network tab and the connection error logs and this PR implements that idea.

This PR moves the pinging logic to a shared worker. This makes the connection error log and the network request to be output in a different location (at least for Chrome, haven't checked with other browsers). Except for that, everything should work the same. Since the error log and the network requests won't be output in the (main) devtools, I guess this would reduce the memory consumption.

closes #16361

sapphi-red avatar Dec 24 '24 06:12 sapphi-red

I noticed that Safari 7-15 does not support Shared Worker 😢 I assumed that it's globally available...

sapphi-red avatar Jan 08 '25 02:01 sapphi-red

/ecosystem-ci run

patak-dev avatar Jul 25 '25 12:07 patak-dev

Open in StackBlitz

npm i https://pkg.pr.new/vite@19057

commit: 78e1551

pkg-pr-new[bot] avatar Jul 25 '25 12:07 pkg-pr-new[bot]