-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Filter routes by environment and fix image loading #15093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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 detectedLatest 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 |
|
| 📦 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 |
HiDeoo
left a comment
There was a problem hiding this 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.
Changes
Reduces memory by having each environment only build the pages it needs:
Testing
Testing against astro.build to see the memory difference.
Docs
N/A, bug fix