fix(plugin): set content-type header for serving index.html

pull/616/head
Dominic Elm 3 years ago
parent 1617a0438f
commit 0ca147cecb

@ -164,6 +164,7 @@ export function createVitePressPlugin(
server.middlewares.use((req, res, next) => {
if (req.url!.endsWith('.html')) {
res.statusCode = 200
res.setHeader('Content-Type', 'text/html')
res.end(`
<!DOCTYPE html>
<html>

Loading…
Cancel
Save