Skip to content

Commit 97508ec

Browse files
fix(url): use loaderUtils.stringifyRequest to avoid invalidating hashes due to absolute paths (#242)
1 parent a6287c5 commit 97508ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

url.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports.pitch = function (request) {
1818

1919
return [
2020
"// style-loader: Adds some reference to a css file to the DOM by adding a <link> tag",
21-
"var update = require(" + JSON.stringify("!" + path.join(__dirname, "lib", "addStyleUrl.js")) + ")(",
21+
"var update = require(" + loaderUtils.stringifyRequest(this, "!" + path.join(__dirname, "lib", "addStyleUrl.js")) + ")(",
2222
"\trequire(" + loaderUtils.stringifyRequest(this, "!!" + request) + ")",
2323
", " + JSON.stringify(options) + ");",
2424
"// Hot Module Replacement",

0 commit comments

Comments
 (0)