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
According to #4963, @Rich-Harris said we don't preload fonts by default because they may be imported but not used on a page. Though I'm not sure that's a great reason for us to not do it by default as that seems like the user has coded things incorrectly in that case
Describe the proposed solution
Maybe Vite could issue a warning for fonts that are imported, but never used if we really care about detecting that
Alternatives considered
No response
Importance
nice to have
Additional Information
Font preloading sometimes doesn't work before Vite 5. Fixed in vitejs/vite#14297
The text was updated successfully, but these errors were encountered:
We removed loading fonts by default in #7704 because there were too many false positives. Fonts in general can be very dynamic (fallback fonts, load a different font based on a unicode range) and as such just loading them upfront when detected anywhere on the page was turning out to be the wrong default. I'm against switching this, unless we can somehow find out which fonts are definitely loaded.
Describe the problem
According to #4963, @Rich-Harris said we don't preload fonts by default because they may be imported but not used on a page. Though I'm not sure that's a great reason for us to not do it by default as that seems like the user has coded things incorrectly in that case
Describe the proposed solution
Maybe Vite could issue a warning for fonts that are imported, but never used if we really care about detecting that
Alternatives considered
No response
Importance
nice to have
Additional Information
Font preloading sometimes doesn't work before Vite 5. Fixed in vitejs/vite#14297
The text was updated successfully, but these errors were encountered: