diff --git a/.changeset/fuzzy-rats-remain.md b/.changeset/fuzzy-rats-remain.md new file mode 100644 index 000000000..601d2483b --- /dev/null +++ b/.changeset/fuzzy-rats-remain.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Properly show an error message when a renderer is not properly configured diff --git a/packages/astro/src/integrations/index.ts b/packages/astro/src/integrations/index.ts index ba9cac2c8..68d2a23ae 100644 --- a/packages/astro/src/integrations/index.ts +++ b/packages/astro/src/integrations/index.ts @@ -66,6 +66,14 @@ export async function runHookConfigSetup({ config: updatedConfig, command, addRenderer(renderer: AstroRenderer) { + if (!renderer.name) { + throw new Error(`Integration ${bold(integration.name)} has an unnamed renderer.`); + } + + if (!renderer.serverEntrypoint) { + throw new Error(`Renderer ${bold(renderer.name)} does not provide a serverEntrypoint.`); + } + updatedConfig._ctx.renderers.push(renderer); }, injectScript: (stage, content) => {