Skip to content

Commit

Permalink
fix: template comments replace windows \ to / confirm consistent hash (
Browse files Browse the repository at this point in the history
  • Loading branch information
WilsonLiu95 authored and sodatea committed Jan 23, 2019
1 parent 28ec37a commit adc6dd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/loaders/pitcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ module.exports.pitch = function (remainingRequest) {
// For some reason, webpack fails to generate consistent hash if we
// 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.
cacheDirectory: path.isAbsolute(cacheDirectory)
cacheDirectory: (path.isAbsolute(cacheDirectory)
? path.relative(process.cwd(), cacheDirectory)
: cacheDirectory,
: cacheDirectory).replace(/\\/g, '/'),
cacheIdentifier: hash(cacheIdentifier) + '-vue-loader-template'
})}`]
: []
Expand Down

0 comments on commit adc6dd6

Please sign in to comment.