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
{{ message }}
Repository navigation
Only the first import of an async chunk waits for the CSS #23652
My SvelteKit website loads pages asynchronously, but I can see a flash of unstyled content when navigating to some pages. It seems that it tries to preload the page, do some stuff and then import the chunk again. But the second import does not wait for the CSS?
Found this random PR on a random fork which seems to try fixing the same bug: marko-js/vite#320.
AI says this:
The preload helper marks a dependency as seen when it inserts the <link>, not when the link has loaded, and returns early for seen dependencies (if (dep.href in seen) return). Only the call that inserted the link awaits its load event.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Activity
fix(build): wait for in-flight stylesheets in preload helper (fix #23652
Update dependency vite to v8.3.4
Update dependency vite to v8.3.4
Update dependency vite to v8.3.4
fix(deps): update dependency vite to v8.3.4 (#338)
Update dependency vite to v8.3.4
fix(deps): update dependency vite to v8.3.4 (#1087)
Update dependency vite to v8.3.4
Update dependency vite to v8.3.4
⬆️ Update dependency vite to ^8.3.4
⬆️ Update dependency vite to ^8.3.4
Update dependency vite to v8.3.5