Skip to content

Commit b641ab2

Browse files
committed
Add Eleventy:Assets debug output for file system reads
1 parent ab8cdcf commit b641ab2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/AssetCache.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,15 @@ class AssetCache {
267267

268268
async #getCachedContents(type) {
269269
let contentPath = this.getCachedContentsPath(type);
270+
270271
debug(`Fetching from cache ${contentPath}`);
271272

272273
if (type === "json" || type === "parsed-xml") {
274+
debugAssets("Reading from require('%o')", contentPath);
273275
return require(contentPath);
274276
}
275277

278+
debugAssets("Reading from: %o", contentPath);
276279
return fs.readFileSync(contentPath, type !== "buffer" ? "utf8" : null);
277280
}
278281

0 commit comments

Comments
 (0)