code: function processRebase(result, from, dirname, oldUrl, to) {
    var newPath = oldUrl
    if (dirname !== from) {
      newPath = path.relative(from, dirname + path.sep + newPath)
    }
    newPath = path.resolve(from, newPath)
    newPath = path.relative(to, newPath)
    if (path.sep === "\\") {
      newPath = newPath.replace(/\\/g, "\/")
    }
    // New-URLs needs to be relative formatted to allow differentiation between
    // local imports and imports from node_modules.
    if ((oldUrl.charAt(0) === "." || oldUrl.charAt(0) === "/") && newPath.charAt(0) !== "." && newPath.charAt(0) !== "/") {
      newPath = "./" + newPath
    }
    return newPath
  }
docs: Fix url() according to source (`from`) or destination (`to`)