Skip to content

Conversation

@HiDeoo
Copy link
Member

@HiDeoo HiDeoo commented Jan 10, 2026

Changes

Initially reported on Discord, this PR fixes an issue in development mode, when using content collections, where CSS from a previously visited page would incorrectly apply to other pages not using the components with that CSS.

Testing

I updated a fixture to reproduce the issue and added a test to verify the fix by visting two different pages. Before the changes, the second page would incorrectly include CSS from a componment used only in the first page. After the changes, the second page correctly does not include that CSS.

Docs

This is a bug fix; no doc updates are needed.

@changeset-bot
Copy link

changeset-bot bot commented Jan 10, 2026

🦋 Changeset detected

Latest commit: 047e56f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jan 10, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 10, 2026

⚠️ Package Trust Level Decreased

Caution

Decreased trust levels may indicate a higher risk of supply chain attacks. Please review these changes carefully.

📦 Package 🔒 Before 🔓 After
@cloudflare/kv-asset-handler trusted-with-provenance none
@cloudflare/unenv-preset trusted-with-provenance none
workerd trusted-with-provenance none
undici provenance none
miniflare trusted-with-provenance none
youch provenance none
@cloudflare/workerd-darwin-64 trusted-with-provenance none
@cloudflare/workerd-darwin-arm64 trusted-with-provenance none
@cloudflare/workerd-linux-64 trusted-with-provenance none
@cloudflare/workerd-linux-arm64 trusted-with-provenance none
@cloudflare/workerd-windows-64 trusted-with-provenance none
wrangler trusted-with-provenance none

@HiDeoo HiDeoo marked this pull request as ready for review January 10, 2026 17:16
@HiDeoo HiDeoo mentioned this pull request Jan 10, 2026
7 tasks
): Generator<ImportedDevStyle & { id: string; idKey: string }, void, unknown> {
seen.add(id);

// Stop traversing if we reach a propagation stopping point.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a more valuable comment is describing why we need to stop the propagation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point. I just pushed an updated comment trying to clarify that, altho I'm definitely not the most well-versed in assets propagation so I hope it makes sense and helps enough. Let me know if you think it can be improved further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants