addClientRenderer() — astro Function Reference
Architecture documentation for the addClientRenderer() function in index.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD c1a28dd0_a199_58b5_2c6b_81ea79e42161["addClientRenderer()"] cb9f7e72_0a2c_f337_8c0f_3a16cbafeab3["experimental_AstroContainer"] c1a28dd0_a199_58b5_2c6b_81ea79e42161 -->|defined in| cb9f7e72_0a2c_f337_8c0f_3a16cbafeab3 style c1a28dd0_a199_58b5_2c6b_81ea79e42161 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/container/index.ts lines 410–425
public addClientRenderer(options: AddClientRenderer): void {
const { entrypoint, name } = options;
const rendererIndex = this.#pipeline.manifest.renderers.findIndex((r) => r.name === name);
if (rendererIndex === -1) {
throw new Error(
'You tried to add the ' +
name +
" client renderer, but its server renderer wasn't added. You must add the server renderer first. Use the `addServerRenderer` function.",
);
}
const renderer = this.#pipeline.manifest.renderers[rendererIndex];
renderer.clientEntrypoint = entrypoint;
this.#pipeline.manifest.renderers[rendererIndex] = renderer;
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does addClientRenderer() do?
addClientRenderer() is a function in the astro codebase, defined in packages/astro/src/container/index.ts.
Where is addClientRenderer() defined?
addClientRenderer() is defined in packages/astro/src/container/index.ts at line 410.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free