File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,9 @@ class TemplateConfig {
9696 this . userConfig . events . on ( "eleventy#templateModified" , ( inputPath , metadata = { } ) => {
9797 // Might support multiple at some point
9898 this . setPreviousBuildModifiedFile ( inputPath , metadata ) ;
99+
100+ // Issue #3569, set that this file exists in the cache
101+ this . #existsCache. set ( inputPath , true ) ;
99102 } ) ;
100103 }
101104
Original file line number Diff line number Diff line change 11import fs from "node:fs" ;
2+ import { TemplatePath } from "@11ty/eleventy-utils" ;
23
34// Checks both files and directories
45class ExistsCache {
@@ -17,6 +18,13 @@ class ExistsCache {
1718 return this . #exists. has ( path ) ;
1819 }
1920
21+ set ( path , isExist ) {
22+ this . #exists. set ( TemplatePath . addLeadingDotSlash ( path ) , Boolean ( isExist ) ) ;
23+ }
24+
25+ // Not yet needed
26+ // setDirectory(path, isExist) {}
27+
2028 // Relative paths (to root directory) expected (but not enforced due to perf costs)
2129 exists ( path ) {
2230 if ( ! this . #exists. has ( path ) ) {
You can’t perform that action at this time.
0 commit comments