From 226891b9b1630c90835d1bc1a239c2ebbb5c9ff1 Mon Sep 17 00:00:00 2001
From: kabirgh <15871468+kabirgh@users.noreply.github.com>
Date: Sun, 11 Feb 2024 20:20:44 +0000
Subject: [PATCH] fix(fast rebuild): call only required emitters, don't always copy assets (#845)
---
quartz/build.ts | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/quartz/build.ts b/quartz/build.ts
index ed166bb..452a2f1 100644
--- a/quartz/build.ts
+++ b/quartz/build.ts
@@ -203,8 +203,9 @@
const emitterGraph =
(await emitter.getDependencyGraph?.(ctx, processedFiles, staticResources)) ?? null
- // emmiter may not define a dependency graph. nothing to update if so
- if (emitterGraph) {
+ // only update the graph if the emitter plugin uses the changed file
+ // eg. Assets plugin ignores md files, so we skip updating the graph
+ if (emitterGraph?.hasNode(fp)) {
// merge the new dependencies into the dep graph
dependencies[emitter.name]?.updateIncomingEdgesForNode(emitterGraph, fp)
}
--
Gitblit v1.10.0