Skip to content

Commit

Permalink
Updates are now async.
Browse files Browse the repository at this point in the history
Co-authored-by: 翠 / green <green@sapphi.red>
  • Loading branch information
timacdonald and sapphi-red committed Jun 9, 2022
1 parent 96f07a4 commit 8c81350
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions playground/hmr/hmr.ts
Expand Up @@ -46,8 +46,8 @@ if (import.meta.hot) {
(document.querySelector('.global-css') as HTMLLinkElement).href
)

// We don't have a vite:afterUpdate event, but updates are currently
// sync. We need to wait until the tag has been swapped out, which
// We don't have a vite:afterUpdate event.
// We need to wait until the tag has been swapped out, which
// includes the time taken to download and parse the new stylesheet.
const observer = new MutationObserver((mutations) => {
mutations.forEach((mutation) => {
Expand Down

0 comments on commit 8c81350

Please sign in to comment.