Skip to content

Commit fa469fd

Browse files
Domantaskiaking
Domantas
andauthored
fix: build fails without css chunks (#209) (#239)
Co-authored-by: Kia King Ishii <kia.king.08@gmail.com>
1 parent d1a62e1 commit fa469fd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/node/build/render.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ export async function renderPage(
5353
})
5454
.join('\n ')
5555

56+
const stylesheetLink = cssChunk
57+
? `<link rel="stylesheet" href="${siteData.base}${cssChunk.fileName}">`
58+
: ''
59+
5660
const html = `
5761
<!DOCTYPE html>
5862
<html lang="${siteData.lang}">
@@ -65,7 +69,7 @@ export async function renderPage(
6569
<meta name="description" content="${
6670
pageData.description || siteData.description
6771
}">
68-
<link rel="stylesheet" href="${siteData.base}${cssChunk.fileName}">
72+
${stylesheetLink}
6973
${preloadLinks}
7074
${renderHead(siteData.head)}
7175
${renderHead(frontmatterHead && filterOutHeadDescription(frontmatterHead))}

0 commit comments

Comments
 (0)