Skip to content

Commit

Permalink
Fix styles
Browse files Browse the repository at this point in the history
  • Loading branch information
drwpow committed Sep 23, 2021
1 parent 3c20e7b commit 0a06eeb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/astro/src/internal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => `<style>${style}</style>`);
const styles = Array.from(result.styles).map((style: any) => renderElement('style', style));
const scripts = Array.from(result.scripts);
return template.replace('</head>', styles.join('\n') + scripts.join('\n') + '</head>');
}
Expand Down
2 changes: 2 additions & 0 deletions packages/astro/src/runtime/ssr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0a06eeb

Please sign in to comment.