Commit adc6dd63 authored by WilsonLiu95's avatar WilsonLiu95 Committed by Haoqun Jiang

fix: template comments replace windows \ to / confirm consistent hash (#1477)

parent 28ec37ab
...@@ -112,9 +112,9 @@ module.exports.pitch = function (remainingRequest) { ...@@ -112,9 +112,9 @@ module.exports.pitch = function (remainingRequest) {
// For some reason, webpack fails to generate consistent hash if we // For some reason, webpack fails to generate consistent hash if we
// use absolute paths here, even though the path is only used in a // use absolute paths here, even though the path is only used in a
// comment. For now we have to ensure cacheDirectory is a relative path. // comment. For now we have to ensure cacheDirectory is a relative path.
cacheDirectory: path.isAbsolute(cacheDirectory) cacheDirectory: (path.isAbsolute(cacheDirectory)
? path.relative(process.cwd(), cacheDirectory) ? path.relative(process.cwd(), cacheDirectory)
: cacheDirectory, : cacheDirectory).replace(/\\/g, '/'),
cacheIdentifier: hash(cacheIdentifier) + '-vue-loader-template' cacheIdentifier: hash(cacheIdentifier) + '-vue-loader-template'
})}`] })}`]
: [] : []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment