Commit d3fa4678 authored by Maël Nison's avatar Maël Nison Committed by Haoqun Jiang

fix: use `require.resolve` when referencing `cache-loader` (#1585)

parent 1aaedc74
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment