Skip to content

Commit 2509c13

Browse files
committed
fix($hmr): Prepend relative publicPath to new filename path.
Previous code dropped publicPath on the floor when it was relative, which would have broken certain corner cases.
1 parent c86dfac commit 2509c13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hotModuleReplacement.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = function(publicPath, outputFilename) {
22
if (document) {
3-
var newHref = publicPath.match(/https?:/g) ? new URL(outputFilename, publicPath) : new URL(outputFilename, window.location);
3+
var newHref = publicPath.match(/https?:/g) ? new URL(outputFilename, publicPath) : new URL(publicPath + outputFilename, window.location);
44
var links = document.getElementsByTagName('link');
55

66
//update the stylesheet corresponding to `outputFilename`

0 commit comments

Comments
 (0)