Skip to content

Commit

Permalink
Merge pull request #322 from katywings/fix-fetchpriority2
Browse files Browse the repository at this point in the history
fix: replace fetchpriority with fetchPriority
  • Loading branch information
ryansolid authored Jul 9, 2024
2 parents ceed7d4 + f289889 commit 33dc7d6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/old-tables-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vinxi": patch
---

Fixed casing of `fetchPriority` according to the HTML standard.
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", fetchpriority: "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",
fetchpriority: "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",
// fetchpriority: "high",
// fetchPriority: "high",
// },
// })),
// };
Expand Down

0 comments on commit 33dc7d6

Please sign in to comment.