Skip to content
Permalink
Browse files
fix(vite): improve initial load, close #1565
  • Loading branch information
antfu committed Sep 26, 2022
1 parent 8abebfd commit b8c8844af34db52f668522d57a4f1dd5222dd741
Showing 1 changed file with 8 additions and 1 deletion.
@@ -96,8 +96,15 @@ export function GlobalModeDevPlugin({ uno, tokens, affectedModules, onInvalidate
servers.push(_server)

_server.ws.on(WS_EVENT_PREFIX, ([layer, hash]: string[]) => {
if (lastServedHash.get(layer) !== hash)
if (lastServedHash.get(layer) !== hash) {
sendUpdate(entries)
}
else {
setTimeout(() => {
if (lastServedHash.get(layer) !== hash)
sendUpdate(entries)
}, 50)
}
})
},
buildStart() {

0 comments on commit b8c8844

Please sign in to comment.