Skip to content

Commit

Permalink
fix: build fails without css chunks (#209) (#239)
Browse files Browse the repository at this point in the history
Co-authored-by: Kia King Ishii <[email protected]>
  • Loading branch information
Domantas and kiaking authored Apr 8, 2021
1 parent d1a62e1 commit fa469fd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/node/build/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export async function renderPage(
})
.join('\n ')

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

const html = `
<!DOCTYPE html>
<html lang="${siteData.lang}">
Expand All @@ -65,7 +69,7 @@ export async function renderPage(
<meta name="description" content="${
pageData.description || siteData.description
}">
<link rel="stylesheet" href="${siteData.base}${cssChunk.fileName}">
${stylesheetLink}
${preloadLinks}
${renderHead(siteData.head)}
${renderHead(frontmatterHead && filterOutHeadDescription(frontmatterHead))}
Expand Down

0 comments on commit fa469fd

Please sign in to comment.