Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Update <base> to reflect current route? #228

@Rich-Harris

Description

@Rich-Harris

At present, <base> is the same for all pages, which means you can't use relative URLs. This was introduced for good reasons, but it turns out to cause problems.

I'm not sure that it can be removed without breaking base URL functionality though — for example, things like this would break:

<link rel=stylesheet href=global.css >
.thing { background-image: url(images/whatever.jpg); }

Also, this.fetch(relativeUrl, ..) is tricky, because it needs to be relative to the page you're going to, not the page you're currently on, so it can't just straightforwardly delegate to fetch as it currently does.

It might be that the solution is just to not use relative URLs 😬 Unless there's already a creative solution for this problem?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions