Skip to content

✨ Quality: Create BundleLinker utility to track and propagate bundle additions across template renders#4246

Open
andoan16 wants to merge 1 commit into11ty:mainfrom
andoan16:contribai/improve/quality/create-bundlelinker-utility-to-track-and
Open

✨ Quality: Create BundleLinker utility to track and propagate bundle additions across template renders#4246
andoan16 wants to merge 1 commit into11ty:mainfrom
andoan16:contribai/improve/quality/create-bundlelinker-utility-to-track-and

Conversation

@andoan16
Copy link
Copy Markdown

Problem

This new utility class tracks bundle additions (CSS/JS) that were registered during collection item renders, so they can be replayed when those items' templateContent is accessed by a parent template. This is the core mechanism needed to solve the issue where nested partials' CSS/JS includes aren't loaded when accessed via collections.

Severity: high
File: src/Util/BundleLinker.js

Solution

This new utility class tracks bundle additions (CSS/JS) that were registered during collection item renders, so they can be replayed when those items' templateContent is accessed by a parent template. This is the core mechanism needed to solve the issue where nested partials' CSS/JS includes aren't loaded when accessed via collections.

Changes

  • src/Util/BundleLinker.js (new)

Testing

  • Existing tests pass
  • Manual review completed
  • No new warnings/errors introduced

Closes #3730

…ndle additions across template renders

This new utility class tracks bundle additions (CSS/JS) that were registered during collection item renders, so they can be replayed when those items' templateContent is accessed by a parent template. This is the core mechanism needed to solve the issue where nested partials' CSS/JS includes aren't loaded when accessed via collections.

Affected files: BundleLinker.js

Signed-off-by: andoan16 <33853760+andoan16@users.noreply.github.com>
@andoan16 andoan16 requested a review from zachleat as a code owner March 28, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Partial uses collection, which include partials - js/css includes in nested partials aren't loading

1 participant