From 0a06eeb11e5c58839a0a223bbe5440a6f1bf89cc Mon Sep 17 00:00:00 2001 From: Drew Powers Date: Thu, 23 Sep 2021 16:07:14 -0600 Subject: [PATCH] Fix styles --- packages/astro/src/internal/index.ts | 2 +- packages/astro/src/runtime/ssr.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/astro/src/internal/index.ts b/packages/astro/src/internal/index.ts index b9d5ddeaadcb1..067fe6c6763a9 100644 --- a/packages/astro/src/internal/index.ts +++ b/packages/astro/src/internal/index.ts @@ -236,7 +236,7 @@ export async function renderToString(result: any, componentFactory: AstroCompone export async function renderPage(result: any, Component: AstroComponentFactory, props: any, children: any) { const template = await renderToString(result, Component, props, children); - const styles = Array.from(result.styles).map((style) => ``); + const styles = Array.from(result.styles).map((style: any) => renderElement('style', style)); const scripts = Array.from(result.scripts); return template.replace('', styles.join('\n') + scripts.join('\n') + ''); } diff --git a/packages/astro/src/runtime/ssr.ts b/packages/astro/src/runtime/ssr.ts index 0f561d30edb42..5051fee166155 100644 --- a/packages/astro/src/runtime/ssr.ts +++ b/packages/astro/src/runtime/ssr.ts @@ -231,6 +231,8 @@ export async function ssr({ astroConfig, filePath, logging, mode, origin, pathna html = resolveNpmImports(html); } + console.log({ html }); + // 5. finish return html; } catch (e: any) {