Skip to content

Commit

Permalink
fix: use require.resolve when referencing cache-loader (#1585)
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanis authored and haoqunjiang committed Sep 2, 2019
1 parent 1aaedc7 commit d3fa467
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/loaders/pitcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ module.exports.pitch = function (remainingRequest) {
if (query.type === `template`) {
const path = require('path')
const cacheLoader = cacheDirectory && cacheIdentifier
? [`cache-loader?${JSON.stringify({
? [`${require.resolve('cache-loader')}?${JSON.stringify({
// 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.
Expand Down

0 comments on commit d3fa467

Please sign in to comment.