diff --git a/packages/astro/src/compiler/codegen/index.ts b/packages/astro/src/compiler/codegen/index.ts index 6a5b5e5464..39f39dc387 100644 --- a/packages/astro/src/compiler/codegen/index.ts +++ b/packages/astro/src/compiler/codegen/index.ts @@ -689,10 +689,12 @@ async function compileHtml(enterNode: TemplateNode, state: CodegenState, compile } if (!componentInfo && !isCustomElementTag(componentName)) { if (hydrationAttributes.method) { - throw new Error(`Unable to hydrate "${componentName}" because it is statically defined in the frontmatter script. Hydration directives may only be used on imported components.`); + throw new Error( + `Unable to hydrate "${componentName}" because it is statically defined in the frontmatter script. Hydration directives may only be used on imported components.` + ); } - // Previously we would throw here, but this is valid! + // Previously we would throw here, but this is valid! // If the frontmatter script defines `const Element = 'h1'`, // you should be able to statically render ``