Use `path.resolve` only if resolveURL is true