feat-agency / vite-plugin-webfont-dl

⚡ Webfont Download Vite Plugin - Make your Vite site load faster
MIT License
302 stars 11 forks source link

Fonts are loaded in development but failing on build #2

Closed jahermosilla closed 2 years ago

jahermosilla commented 2 years ago

It seems that there's a problem (At least with Chrome) when the project is built.

The resource xxx.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.

It seems that adding rel="stylesheet preload" instead of rel="preload" at this line solves the problem.

0xb4lint commented 2 years ago

rel="stylesheet preload" is not a valid parameter according to https://www.w3.org/TR/preload/

besides that, only the generated webfonts.css is preloaded, the fonts are not

could you please paste the generated, dist index.html?