Skip to content

Commit

Permalink
perf: preload css to improve loading speed
Browse files Browse the repository at this point in the history
Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
  • Loading branch information
sanjaiyan-dev and brc-dd committed Dec 21, 2022
1 parent f40df31 commit bf1315a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/build/render.ts
Expand Up @@ -101,7 +101,7 @@ export async function renderPage(
.join('\n ')

const stylesheetLink = cssChunk
? `<link rel="stylesheet" href="${siteData.base}${cssChunk.fileName}">`
? `<link rel="preload stylesheet" href="${siteData.base}${cssChunk.fileName}" as="style">`
: ''

const title: string = createTitle(siteData, pageData)
Expand Down

0 comments on commit bf1315a

Please sign in to comment.