Skip to content

Commit d3fa467

Browse files
arcanishaoqunjiang
authored andcommitted
fix: use require.resolve when referencing cache-loader (#1585)
1 parent 1aaedc7 commit d3fa467

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/loaders/pitcher.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ module.exports.pitch = function (remainingRequest) {
128128
if (query.type === `template`) {
129129
const path = require('path')
130130
const cacheLoader = cacheDirectory && cacheIdentifier
131-
? [`cache-loader?${JSON.stringify({
131+
? [`${require.resolve('cache-loader')}?${JSON.stringify({
132132
// For some reason, webpack fails to generate consistent hash if we
133133
// use absolute paths here, even though the path is only used in a
134134
// comment. For now we have to ensure cacheDirectory is a relative path.

0 commit comments

Comments
 (0)