diff --git a/.changeset/three-trainers-fetch.md b/.changeset/three-trainers-fetch.md new file mode 100644 index 00000000..fd1c8c3b --- /dev/null +++ b/.changeset/three-trainers-fetch.md @@ -0,0 +1,5 @@ +--- +"vinxi": patch +--- + +fix: css asset href is relative diff --git a/packages/vinxi/lib/manifest/prod-server-manifest.js b/packages/vinxi/lib/manifest/prod-server-manifest.js index e24a5c1b..5ad9024b 100644 --- a/packages/vinxi/lib/manifest/prod-server-manifest.js +++ b/packages/vinxi/lib/manifest/prod-server-manifest.js @@ -14,7 +14,7 @@ function createHtmlTagsForAssets(router, app, assets) { .map((asset) => ({ tag: "link", attrs: { - href: joinURL(app.config.server.baseURL ?? "", router.base, asset), + 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" }