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.
Describe the bug
In a remote function,
event.url.pathnameis 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.