Replies: 1 comment 2 replies
-
Given most content bundles should be relatively small, it might even make sense to chunk by default at some reasonable size as a first step and then see if there’s still a need to make it configurable. Do you have an example of the kinds and quantity of content that are passing 25 MB? As an example, the bundle for |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Body
Summary
Introduce chunked snapshot generation for content collections to prevent deployment failures when content collections snapshot files exceed platform file size limits (specifically the 25MB hard limit on Cloudflare Workers/Pages).
Background & Motivation
The current Content Layer API in Astro generates a single snapshot file containing all content collection data. While this approach works well for smaller sites, it creates deployment issues for content-based sites when deploying to platforms with file size restrictions:
This prevents successful deployment of otherwise valid Astro sites to a popular deployment platform.
Goals
Introduce configurable chunking for content collections snapshots with the following features:
Splitting strategy to be discussed (per collection? adaptive?).
An accompanying solution could be exploring snapshot file compression with a method like CBOR.
Example
Build output:
Beta Was this translation helpful? Give feedback.
All reactions