콘텐츠로 이동

No component compiled by astro() has been loaded.

RenderNotConfigured: renderToString() and renderToResponse() render components compiled by the astro() Vite plugin, and none has been loaded.

@astrojs/runtime의 renderToString() 및 renderToResponse()는 @astrojs/vite-plugin-astro의 astro() Vite 플러그인으로 컴파일된 컴포넌트를 렌더링하며, 이 플러그인은 컴포넌트에 필요한 렌더러, 클라이언트 지시어 및 컴포넌트 자산을 등록합니다. 현재 환경에서는 astro()로 컴파일된 컴포넌트가 로드되지 않았으므로 렌더링할 대상이 없습니다.

astro() 없이 컴파일된 컴포넌트를 렌더링하려면 @astrojs/runtime의 createRenderer()로 렌더러를 생성하고, 해당 렌더러의 renderToString() 및 renderToResponse()를 사용하세요.

기여하기 커뮤니티 후원하기