Skip to content

Commit

Permalink
docs(changeset): fix prod-server-manifest to handle #vinxi/handler pr…
Browse files Browse the repository at this point in the history
…operly
  • Loading branch information
nksaraf committed Sep 19, 2023
1 parent 7bc0cf0 commit fd06048
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/large-buses-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vinxi": patch
---

fix prod-server-manifest to handle #vinxi/handler properly
6 changes: 4 additions & 2 deletions packages/vinxi/lib/manifest/prod-server-manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function createProdManifest(app) {
input === router.handler ? "virtual:#vinxi/handler" : input;
return {
assets() {
return findAssetsInViteManifest(bundlerManifest, input)
return findAssetsInViteManifest(bundlerManifest, id)
.filter((asset) => asset.endsWith(".css"))
.map((asset) => ({
tag: "link",
Expand All @@ -92,7 +92,9 @@ export function createProdManifest(app) {
};
} else if (router.build.target === "browser") {
const id =
input === router.handler ? "virtual:#vinxi/handler" : input;
input === router.handler && !input.endsWith(".html")
? "virtual:#vinxi/handler"
: input;
return {
assets() {
return findAssetsInViteManifest(bundlerManifest, id)
Expand Down

0 comments on commit fd06048

Please sign in to comment.