diff --git a/.changeset/webview-relative-base.md b/.changeset/webview-relative-base.md index fb777000..be20bec9 100644 --- a/.changeset/webview-relative-base.md +++ b/.changeset/webview-relative-base.md @@ -2,4 +2,4 @@ "aicodeman": patch --- -Web tabs whose dashboard ships a relative `` render again. The proxy rewrites the document URL to strip its `/webview//` prefix, and a relative base is resolved against that URL — so `./` (what Vite builds emit, DeepSeek Harness among them) pointed at Codeman's root: every module script 404'd and the page painted its background with nothing on it. The rewrite now resolves such a base against the document's own directory inside the proxy prefix before the mask runs (a page at `/webview//app/page.html` gets `/webview//app/`, not the proxy root); a cross-origin base is left exactly as the author wrote it. +Web tabs whose dashboard ships a relative `` render again. The proxy rewrites the document URL to strip its `/webview//` prefix, and a relative base is resolved against that URL — so `./` (what Vite builds emit, DeepSeek Harness among them) pointed at Codeman's root: every module script 404'd and the page painted its background with nothing on it. The rewrite now resolves such a base against the document's own directory inside the proxy prefix before the mask runs (a page at `/webview//app/page.html` gets `/webview//app/`, not the proxy root); a cross-origin base is left exactly as the author wrote it. The root-absolute `import("/...")` rewrite is confined to ``, + CAP + ); + expect(out).toContain(`import("${PREFIX}_app/a.js")`); + expect(out).toContain(`import('${PREFIX}b.js')`); + }); + it('rebases root-absolute src/href/action, which cannot fix', () => { const out = rewriteHtml( `
`,