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
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixed
TanStack Start dev: a burst of style refreshes no longer multiplies a page's stylesheet links. Each oj:css frame re-linked every stylesheet link in the page, the new links still loading from earlier frames among them, so the links doubled with every frame that came before they loaded. A gate's flush sends all the frames it held at once: 12 frames within 110 ms left 2,048 links to one sheet and some 2,800 requests for it, and a large page spent minutes restyling, unresponsive. A sheet now has one new link loading at a time; the frames that come while it loads ask for one more after it, for the sheet as it is after the last of them. A new link that fails to load, or that the page takes out, does not hold its sheet back from the next frame, and a disabled link, which the browser never fetches, is not re-linked.
Dev: css updates for one stylesheet link that come faster than the sheet loads no longer leave links behind. Each update swapped the original link, and only the first new link's load removed it, so a burst of N updates left N−1 links for good. An update now swaps the newest link, as Vite's client does (outdatedLinkTags), and the old link also goes when the new one fails to load.