Astro Container API (experimental)
DRANK

Added in: astro@4.9.0The Container API allows you to render Astro components in isolation.This experimental server-side API unlocks a variety of potential future uses, but is currently scoped to allow testing of .astro component output in vite environments such as vitest.It also allows you to manually load rendering scripts for creating containers in pages rendered on demand or other “shell” environments outside of vite (e.g. inside a PHP or Elixir application).This API allows you to create a new container, and render an Astro component returning a string or a Response.This API is experimental and subject to breaking changes, even in minor or patch releases. Please consult the Astro CHANGELOG for changes as they occur. This page will always be updated with the most current information for the latest version of Astro.create()Section titled “create()”Type: (options?: AstroContainerOptions) => Promise<experimental_AstroContainer>Creates a new instance of the container.import { experi…

docs.astro.build
Related Topics: API Economy