Skip to content

Commit a253c86

Browse files
committed
fix 11ty#2798: deleting a file trigger a build
1 parent 68029c5 commit a253c86

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Eleventy.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -1217,9 +1217,14 @@ Arguments:
12171217
await watchRun(path);
12181218
});
12191219

1220-
watcher.on("unlink", (path) => {
1221-
// this.logger.forceLog(`File removed: ${path}`);
1220+
watcher.on("unlink", async (path) => {
1221+
// Emulated passthrough copy logs from the server
1222+
if (!this.eleventyServe.isEmulatedPassthroughCopyMatch(path)) {
1223+
this.logger.forceLog(`File removed: ${path}`);
1224+
}
1225+
12221226
this.fileSystemSearch.delete(path);
1227+
await watchRun(path);
12231228
});
12241229
}
12251230

0 commit comments

Comments
 (0)