mirror of
https://github.com/TanStack/router.git
synced 2026-11-16 19:38:07 +00:00
test(compiler-test-utils): settlePage also waits for what the page's invalidate() asked of the server
An accept callback that calls import.meta.hot.invalidate() (React Refresh on a route module it cannot refresh) sends vite:invalidate back to the server, which answers with an update or a full reload. The sync token could reach the page before that answer, so settlePage resolved before the reload: shown with a 400 ms client->server delay on the addHmr: false React row (reload after settle) and by a new control that fails on the previous helper. The page now answers each sync token over the same WebSocket (import.meta.hot.send); Vite handles a page's messages in order and an invalidation synchronously, so a page counts as settled once its answer came back with nothing else sent to the client since the token went out; otherwise another token follows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
468e054d0c
commit
3bb5f4876f
2 changed files with 147 additions and 33 deletions
Loading…
Add table
Add a link
Reference in a new issue