Skip to content

Commit f391884

Browse files
refactor: drop normalize-url package
1 parent 6d58a5d commit f391884

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

src/hmr/normalize-url.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,5 @@ module.exports = function (urlString) {
3434

3535
var path = normalizeUrl(components);
3636

37-
urlString = protocol + host + path;
38-
39-
return urlString;
37+
return protocol + host + path;
4038
};

test/cases/hmr/expected/webpack-4/main.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1147,9 +1147,7 @@ module.exports = function (urlString) {
11471147

11481148
var path = normalizeUrl(components);
11491149

1150-
urlString = protocol + host + path;
1151-
1152-
return urlString;
1150+
return protocol + host + path;
11531151
};
11541152

11551153

test/cases/hmr/expected/webpack-5/main.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,7 @@ module.exports = function (urlString) {
289289

290290
var path = normalizeUrl(components);
291291

292-
urlString = protocol + host + path;
293-
294-
return urlString;
292+
return protocol + host + path;
295293
};
296294

297295

0 commit comments

Comments
 (0)