loader.loadCollection() — astro Function Reference
Architecture documentation for the loader.loadCollection() function in live.config.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 0b87f44f_6a35_b3a1_109a_f1ea82a05442["loader.loadCollection()"] 2bc94997_492e_a0e0_e675_f88ddaa59347["live.config.ts"] 0b87f44f_6a35_b3a1_109a_f1ea82a05442 -->|defined in| 2bc94997_492e_a0e0_e675_f88ddaa59347 style 0b87f44f_6a35_b3a1_109a_f1ea82a05442 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/test/fixtures/live-loaders/src/live.config.ts lines 63–80
loadCollection: async ({ filter, collection }) => {
return {
entries: filter?.addToAge
? Object.values(entries).map((entry) => ({
...entry,
data: {
title: filter.returnInvalid ? 99 as any : entry.data.title,
age: entry.data.age ? entry.data.age + filter!.addToAge! : undefined,
collection
},
}))
: Object.values(entries),
cacheHint: {
tags: ['page'],
lastModified: new Date('2025-01-02T00:00:00.000Z'),
},
};
},
Domain
Subdomains
Source
Frequently Asked Questions
What does loader.loadCollection() do?
loader.loadCollection() is a function in the astro codebase, defined in packages/astro/test/fixtures/live-loaders/src/live.config.ts.
Where is loader.loadCollection() defined?
loader.loadCollection() is defined in packages/astro/test/fixtures/live-loaders/src/live.config.ts at line 63.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free