Skip to content

Commit

Permalink
fix: merge head elements into single head response
Browse files Browse the repository at this point in the history
  • Loading branch information
BowlingX committed Jan 30, 2024
1 parent 2136bb3 commit 8404dd7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/shell/app-shell.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,13 @@ export default async function (
if (typeof thisOutputMode === 'function') {
return thisOutputMode(req, res, {
styles: chunkExtractor.getStyleTags(),
links: chunkExtractor.getLinkTags(),
head: renderToStaticMarkup(
<>
<meta charSet="utf-8" />
{chunkExtractor.getLinkElements()}
{additionalHeadElement}
</>
),
content: renderedApp,
scripts: renderToStaticMarkup(<Scripts />),
})
Expand Down
2 changes: 1 addition & 1 deletion src/types/entrypoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export type OutputMode =
res: NextApiResponse,
result: {
styles: string
links: string
head: string
content: string
scripts: string
}
Expand Down

0 comments on commit 8404dd7

Please sign in to comment.