I am beginning to adopt the <link rel="preload"> strategy for some of my fonts and by using the Lighthouse auditing tool, I have been able to find some good candidates.
Lighthouse recommends me 5, 3 of which are static and so are easy to preload. They take the form of:
<link rel="preload" href="/fonts/my-font.woff" as="font" type="font/woff">
The other 2 are generated dynamically by Angular and are inserted into my HTML at runtime. The issue with these fonts is that they take the name of my-font.sr7er987f.woff and I suspect this value will be different every time I build and deploy my app.
I was curious if there were a way to set a dynamic href attribute on my <link> that could grab these fonts? Something like <link rel="preload" href="fonts/my-font.*.woff".
Thanks