diff --git a/lib/loaders/pitcher.js b/lib/loaders/pitcher.js index 8cda012af..9ed4ceece 100644 --- a/lib/loaders/pitcher.js +++ b/lib/loaders/pitcher.js @@ -72,7 +72,10 @@ module.exports.pitch = function (remainingRequest) { // for templates: inject the template compiler & optional cache if (query.type === `template`) { const cacheLoader = cacheDirectory && cacheIdentifier - ? [`cache-loader?${JSON.stringify(options)}`] + ? [`cache-loader?${JSON.stringify({ + cacheDirectory, + cacheIdentifier: cacheIdentifier + '-vue-loader-template' + })}`] : [] const request = genRequest([ ...cacheLoader,