fix: utf-8 character not working on safari in dev mode

pull/228/head
Kia King Ishii 5 years ago
parent 8a0db65a8a
commit 04e24ce23d

@ -78,11 +78,17 @@ export function createVitePressPlugin(
server.middlewares.use((req, res, next) => {
if (req.url!.endsWith('.html')) {
res.statusCode = 200
res.end(
`<!DOCTYPE html>\n` +
`<div id="app"></div>\n` +
`<script type="module" src="/@fs/${APP_PATH}/index.js"></script>`
)
res.end(`
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div id="app"></div>
<script type="module" src="/@fs/${APP_PATH}/index.js"></script>
</body>
</html>`)
return
}
next()

Loading…
Cancel
Save