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 <noreply@anthropic.com>
This commit is contained in:
parent
1a3f294b31
commit
f324ffb2cb
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue