File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 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) {
101101
102102 // for templates: inject the template compiler & optional cache
103103 if ( query . type === `template` ) {
104+ const path = require ( 'path' )
104105 const cacheLoader = cacheDirectory && cacheIdentifier
105106 ? [ `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 ,
107113 cacheIdentifier : hash ( cacheIdentifier ) + '-vue-loader-template'
108114 } ) } `]
109115 : [ ]
You can’t perform that action at this time.
0 commit comments