diff --git a/lib/path/index.js b/lib/path/index.js index 8c7ee12fb..97789746a 100644 --- a/lib/path/index.js +++ b/lib/path/index.js @@ -24,6 +24,7 @@ var normalize = * @returns {string} Normalized path */ path.normalize = function normalize(path) { + if (path.startsWith("http")) return path; var firstTwoCharacters = path.substring(0,2); var uncPrefix = ""; if (firstTwoCharacters === "\\\\") { diff --git a/lib/path/tests/index.js b/lib/path/tests/index.js index 6b6155667..8cf3e877f 100644 --- a/lib/path/tests/index.js +++ b/lib/path/tests/index.js @@ -61,6 +61,13 @@ tape.test("path", function(test) { origin: "\\\\some-unc\\path\\..\\origin.js", expected: "\\\\some-unc/file.js" } + }, { + actual: "https://mydomain.com/path/file.json", + normal: "https://mydomain.com/path/file.json", + resolve: { + origin: "https://mydomain.com/path/file.json", + expected: "https://mydomain.com/path/file.json" + } } ];