diff --git a/docs/.vitepress/plugins/vite-frontmatter-assets.ts b/docs/.vitepress/plugins/vite-frontmatter-assets.ts index bb68f3e0b..a2ec81203 100644 --- a/docs/.vitepress/plugins/vite-frontmatter-assets.ts +++ b/docs/.vitepress/plugins/vite-frontmatter-assets.ts @@ -155,15 +155,13 @@ export function frontmatterAssets(): Plugin { const ext = parse(filePath).ext.slice(1) const fileContent = await readFile(filePath) - res.write(fileContent) res.writeHead(200, { 'Content-Type': ext === 'svg' ? 'image/svg+xml' : `image/${ext}`, 'Content-Length': fileContent.length, 'Cache-Control': 'public, max-age=31536000, immutable', }) + res.end(fileContent) res.end() - - return next() }) }, async writeBundle() {