From f324ffb2cb65573219ba3b0538905f8aa1c51620 Mon Sep 17 00:00:00 2001 From: kaivalya Date: Thu, 9 Jul 2026 15:24:41 +0200 Subject: [PATCH] F6: HTML export icon fetch respects BASE_URL fetchIconAsBase64 fetched '/icon.svg', which 404s on subdirectory deploys even though Vite is configured with base: './'. It now resolves the icon against import.meta.env.BASE_URL like database.js already does for the wasm file. Subdirectory deploys should be spot-checked with npm run preview under a subpath. Co-Authored-By: Claude Fable 5 --- src/composables/useHtmlExport.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/composables/useHtmlExport.js b/src/composables/useHtmlExport.js index 21c2d47..dd03961 100644 --- a/src/composables/useHtmlExport.js +++ b/src/composables/useHtmlExport.js @@ -98,7 +98,8 @@ function renderSessionItemsHtml(log) { async function fetchIconAsBase64() { try { - const res = await fetch('/icon.svg') + // Resolve against BASE_URL so subdirectory deploys (base: './') still find the icon + const res = await fetch(import.meta.env.BASE_URL + 'icon.svg') if (!res.ok) return null const text = await res.text() const bytes = new TextEncoder().encode(text)