File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -101,9 +101,15 @@ module.exports.pitch = function (remainingRequest) {
101
101
102
102
// for templates: inject the template compiler & optional cache
103
103
if ( query . type === `template` ) {
104
+ const path = require ( 'path' )
104
105
const cacheLoader = cacheDirectory && cacheIdentifier
105
106
? [ `cache-loader?${ JSON . stringify ( {
106
- cacheDirectory,
107
+ // For some reason, webpack fails to generate consistent hash if we
108
+ // use absolute paths here, even though the path is only used in a
109
+ // comment. For now we have to ensure cacheDirectory is a relative path.
110
+ cacheDirectory : path . isAbsolute ( cacheDirectory )
111
+ ? path . relative ( process . cwd ( ) , cacheDirectory )
112
+ : cacheDirectory ,
107
113
cacheIdentifier : hash ( cacheIdentifier ) + '-vue-loader-template'
108
114
} ) } `]
109
115
: [ ]
You can’t perform that action at this time.
0 commit comments