Skip to content

Commit

Permalink
fix: replace stylesheet precendence with fetchpriority
Browse files Browse the repository at this point in the history
  • Loading branch information
katywings committed May 12, 2024
1 parent 6f3d81b commit 23edbdd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/smart-horses-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vinxi": patch
---

Replaced stylesheet `precendence` attribute with `fetchpriority`.
2 changes: 1 addition & 1 deletion packages/vinxi/lib/manifest/prod-server-manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function createHtmlTagsForAssets(router, app, assets) {
href: joinURL(app.config.server.baseURL ?? "/", router.base, asset),
key: join(app.config.server.baseURL ?? "", router.base, asset),
...(asset.endsWith(".css")
? { rel: "stylesheet", precendence: "high" }
? { rel: "stylesheet", fetchpriority: "high" }
: { rel: "modulepreload" }),
},
}));
Expand Down
4 changes: 2 additions & 2 deletions packages/vinxi/lib/manifest/spa-manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export async function createSPAManifest(config, bundle, format) {
href: join(config.base, asset),
key: join(config.base, asset),
rel: "stylesheet",
precendence: "high",
fetchpriority: "high",
},
})),
};
Expand All @@ -76,7 +76,7 @@ export async function createSPAManifest(config, bundle, format) {
// href: join(config.base, asset),
// key: join(config.base, asset),
// rel: "stylesheet",
// precendence: "high",
// fetchpriority: "high",
// },
// })),
// };
Expand Down

0 comments on commit 23edbdd

Please sign in to comment.