Skip to content

Commit c4e01ed

Browse files
authored
fix(preview): relative iframe src for subpath deployment (bd-0pm7a) (#226)
* fix(preview): relative iframe src for subpath deployment (bd-0pm7a) Q2DebugIframe and Q2PreviewIframe hard-coded `src="/q2-*.html"`, which is root-absolute and bypasses Vite's `base: './'`. Locally and in Playwright the SPA is served at the host root so the two coincide; under a subpath deployment the iframe requested `https://host/q2-*.html` and got the platform's 404 / SPA shell, blanking the preview. Dropping the leading slash resolves the iframe against the parent doc's pathname, matching how the rest of the build references its assets. Hash-only routing keeps the parent's pathname stable across client navigation, so the relative form is correct at every route. * sync beads (close bd-0pm7a)
1 parent 49617d4 commit c4e01ed

3 files changed

Lines changed: 21 additions & 7 deletions

File tree

0 commit comments

Comments
 (0)