fix: the build runs under a subpath, not only at the domain root

base './' emits relative asset URLs; the manifest, the service-worker
registration and sw.js's precache resolve against their own location;
the four hardcoded /image literals turn relative. Verified headless
under a simulated /edentext/ subpath: boots, types, SW scope correct.
This commit is contained in:
Steffen Becker committed 2026-08-17 18:59:48 +02:00
1 parent b37261375a
commit 3ae8d27b26
7 files changed
+21 -17

No files matched your search

+1 -1
View File
@@ -1130,7 +1130,7 @@
<div class="toolbar-stack" bind:this={toolbarStackEl} style="transform: translateX(-{tbScroll}px);">
<header class:expanded={toolbarExpanded}>
<button class="logo-btn" onclick={() => (aboutOpen = true)} aria-label={t().about.label} title={t().about.label}>
<img src="/EdenText.png" alt="EdenText" class="app-logo" />
<img src="EdenText.png" alt="EdenText" class="app-logo" />
</button>
<Toolbar editor={activeEditor} tick={activeTick} onManageStyles={openStyleManager} />
<div class="header-actions">
+2 -2
View File
@@ -40,9 +40,9 @@
</svg>
</button>
<img class="icon" src="/favicon.svg" alt="" aria-hidden="true" />
<img class="icon" src="favicon.svg" alt="" aria-hidden="true" />
<img class="logo" src="/EdenText.png" alt="EdenText" />
<img class="logo" src="EdenText.png" alt="EdenText" />
<p class="tagline">{t().about.tagline}</p>
+1 -1
View File
@@ -330,7 +330,7 @@
<UiLanguagePicker />
<button class="rb-logo-btn" onclick={() => run(onAbout)} title={t().about.label} aria-label={t().about.label}>
<img src="/favicon.svg" alt="" aria-hidden="true" />
<img src="favicon.svg" alt="" aria-hidden="true" />
</button>
</div>
+1 -1
View File
@@ -19,7 +19,7 @@ window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', ()
// build over the one being edited.
if (import.meta.env.PROD && 'serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js').catch(() => {});
navigator.serviceWorker.register(`${import.meta.env.BASE_URL}sw.js`).catch(() => {});
});
}