relativeURL = function relativeURL(inputUrl) {
    const realUrl = new URL(inputUrl, 'x:/');
    const values = {};
    for(const key in realUrl)values[key] = realUrl[key];
    values.href = inputUrl;
    values.pathname = inputUrl.replace(/[?#].*/, '');
    values.origin = values.protocol = '';
    values.toString = values.toJSON = (..._args)=>inputUrl;
    for(const key in values)Object.defineProperty(this, key, {
        enumerable: true,
        configurable: true,
        value: values[key]
    });
}
A pseudo "fake" URL object to resolve to its relative path.

When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this
runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid
hydration mismatch.

This is based on webpack's existing implementation:
https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js