Skip to content

Conversation

@matthewp
Copy link
Contributor

Changes

Reduces memory by having each environment only build the pages it needs:

  • SSR: only on-demand rendered pages (prerender: false)
  • Prerender: only static pages (prerender: true)
  • Fix image loading to use .prerender/ subdirectory where assets are emitted.
    • Previously was "working" because the server build contained all images by mistake.

Testing

Testing against astro.build to see the memory difference.

Docs

N/A, bug fix

Reduces memory by having each environment only build the pages it needs:
- SSR: only on-demand rendered pages (prerender: false)
- Prerender: only static pages (prerender: true)

Fix image loading to use .prerender/ subdirectory where assets are emitted.
@changeset-bot
Copy link

changeset-bot bot commented Dec 31, 2025

🦋 Changeset detected

Latest commit: cb95536

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 Dec 31, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 31, 2025

⚠️ 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/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

@github-actions github-actions bot added the 🚨 action Modifies GitHub Actions label Dec 31, 2025
@matthewp matthewp added the pr preview Apply this label to a PR to generate a preview release label Dec 31, 2025
@github-actions github-actions bot removed the pr preview Apply this label to a PR to generate a preview release label Dec 31, 2025
@matthewp matthewp marked this pull request as ready for review January 2, 2026 17:23
Copy link
Member

@HiDeoo HiDeoo left a comment

Choose a reason for hiding this comment

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

The changes makes sense and looks good to me 👍

I also tested the changes locally against withastro/astro.build#2060 and can confirm it now builds locally using --max-old-space-size=2048 without running out of memory.

@matthewp matthewp merged commit 8d5f783 into next Jan 2, 2026
40 of 41 checks passed
@matthewp matthewp deleted the v6-memory-pages-filter branch January 2, 2026 17:33
@HiDeoo HiDeoo mentioned this pull request Jan 6, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚨 action Modifies GitHub Actions pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants