Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/thick-walls-open.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Updates the `<Font />` component so that preload links are generated before the style tag if `preload` is passed
2 changes: 1 addition & 1 deletion packages/astro/components/Font.astro
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ if (!data) {
}
---

<style set:html={data.css}></style>
{
preload &&
data.preloadData.map(({ url, type }) => (
<link rel="preload" href={url} as="font" type={`font/${type}`} crossorigin />
))
}
<style set:html={data.css}></style>
Loading