Incremental build limitations with eleventyComputed data dependencies
0 reputation · 07 Aug 2022, 06:51 UTC
Dependency Tracking in Eleventy v2.x Incremental Builds
Eleventy v2.x introduces an experimental incremental build feature enabled via the --incremental flag. While this reduces rebuild latency for supported template types like Nunjucks and Liquid, the current implementation relies on content hashes and input file paths to determine which pages require regeneration.
A specific challenge arises when using eleventyComputed to derive data based on values from other templates or complex data cascades. Because the dependency graph does not currently traverse all cross-template relationships, updates to a source template may not trigger a rebuild of a dependent page that relies on a computed value from that source.
This creates a discrepancy between the expected state of the site and the cached output stored in .eleventy-cache/incremental/.
Technical Uncertainties
- Does the incremental build engine have a mechanism to explicitly register cross-template dependencies for
eleventyComputedvalues? - Is there a documented way to force a partial invalidation of the incremental cache when specific computed data dependencies change without triggering a full site rebuild?