Skip to content

resolve(...) works incorrectly inside a remote function #14537

@Rich-Harris

Description

@Rich-Harris

Describe the bug

In a remote function, event.url.pathname is always / (because the actual pathname of the generated endpoint is an implementation detail that shouldn't be relied upon).

That means that resolve(...) will always return a pathname that's resolved from the root, which generally isn't what people intend, since they can't then use the pathname for anything useful.

We could fall back to non-relative resolution in this case, but that would cause breakage for people who rely on relative pathnames. Or we could just forbid its use altogether. Not sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions