How do we preload fonts?

Upon production:build assets are appended with a unique name. IE: Objectivity-Bold_a184af52.woff2

So how can we preload fonts without knowing what the dynamic name will be?

 <link rel="preload" href="/assets/fonts/Pacifico-Bold_?????????.woff2" as="font" type="font/woff2" crossorigin>

The production manifest stores the mappings of built files. You can use the @asset directive in your blades to get the correct url.

1 Like

Beautiful. thank you!