diff --git a/packages/astro/src/compiler/codegen/index.ts b/packages/astro/src/compiler/codegen/index.ts index af74a368a2..7bfb55f535 100644 --- a/packages/astro/src/compiler/codegen/index.ts +++ b/packages/astro/src/compiler/codegen/index.ts @@ -181,7 +181,7 @@ function getComponentWrapper(_name: string, hydration: HydrationAttributes, { ur let name = _name; let method = hydration.method; - + /** Legacy support for original hydration syntax */ if (name.indexOf(':') > 0) { const [legacyName, legacyMethod] = _name.split(':'); @@ -221,11 +221,11 @@ function getComponentWrapper(_name: string, hydration: HydrationAttributes, { ur }; const importInfo = method - ? { - componentUrl: getComponentUrl(astroConfig, url, pathToFileURL(filename)), - componentExport: getComponentExport() - } - : {}; + ? { + componentUrl: getComponentUrl(astroConfig, url, pathToFileURL(filename)), + componentExport: getComponentExport(), + } + : {}; return { wrapper: `__astro_component(${name}, ${JSON.stringify({ hydrate: method, displayName: _name, ...importInfo })})`, diff --git a/packages/astro/src/compiler/transform/head.ts b/packages/astro/src/compiler/transform/head.ts index 9a12e395b7..94105a03fd 100644 --- a/packages/astro/src/compiler/transform/head.ts +++ b/packages/astro/src/compiler/transform/head.ts @@ -22,7 +22,7 @@ export default function (opts: TransformOptions): Transformer { InlineComponent: { enter(node) { if (hasComponents) { - return + return; } if (node.attributes && node.attributes.some(({ name }: any) => name.startsWith('client:'))) {