lib/plugins/NodeUrlPlugin.js
function resolveUrl (from, to) {
  if (typeof URL === 'function') {
    // Use the new WHATWG URL API
    return new URL(to, from).href;
  }
  else {
    // Use the legacy url API
    return legacyURL.resolve(from, to);
  }
}
function resolveUrl (from, to) {
  if (typeof URL === 'function') {
    // Use the new WHATWG URL API
    return new URL(to, from).href;
  }
  else {
    // Use the legacy url API
    return legacyURL.resolve(from, to);
  }
}
function resolveUrl ( from , to ) { if ( typeof URL === 'function' ) { // Use the new WHATWG URL API return new URL ( to , from ) . href ; } else { // Use the legacy url API return legacyURL . resolve ( from , to ) ; } }
Resolve the given URL, using either the legacy Node.js url API, or the WHATWG URL API.

@param {string} from
@param {string} to
@returns {string}
Resolve the given URL using either the legacy Node . js url API or the WHATWG URL API .