P2b: Relative URL Resolution in instrumented fetch — baseUrl live von location.href #82
Labels
No labels
bug
docs
feature
housekeeping
html-spec
performance
react-compat
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
glow-all/true-headless-browser#82
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
P2b: Relative URL Resolution in instrumented fetch
Priority: MEDIUM
Betrifft: qwik.dev (Lazy-Loading), ALLE Seiten mit
fetch("/assets/...")Aufwand: ~2h
Problembeschreibung
Qwik's Lazy-Loading-Module machen
fetch("/assets/some-bundle.js").Die instrumentierte
fetch()increateFetch()resolved relative URLs nur gegenden
baseUrlder zum Zeitpunkt descreateFetch-Aufrufs gültig war.Wenn die Seite nach-navigiert (z.B. SPA-Routing), ist
baseUrlveraltet.Aktuell:
Problem:
config.baseUrlwird beimcreateFetch-Aufruf einmalig gespeichert.Qwik's dynamische
fetch()-Aufrufe nutzenwindow.fetch()— das ist UNSEREinstrumentierte Variante, aber
baseUrlist noch der initiale Wert.Option A: Live-Resolution via window.location.href
Akzeptanzkriterien
fetch("/absolute/path")wird gegen korrekte base resolvedBetroffene Dateien
src/network/fetch.tssrc/js/script-loader.tstests/unit/sprint18-relative-url.test.ts❌ Nicht implementiert — Relative URL Resolution
Problem: Qwik's Lazy-Loading macht
import("./assets/foo.js")oderfetch("/assets/foo.json").Die instrumentierte
fetch()resolved relative URLs gegenconfig.baseUrl, der beimcreateFetch-Aufruf gesetzt wurde. Nach SPA-Navigation ist dieser veraltet.Benötigt:
baseUrllive vonwindow.location.hreflesen statt statisch speichern.Aufwandsabschätzung: ~2h