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