Skip to content

Commit

Permalink
fix(server): set content-type on html during dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Jul 20, 2022
1 parent 1a614ee commit d805861
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/histoire/src/node/vite.ts
Expand Up @@ -277,6 +277,7 @@ if (import.meta.hot) {
// Apply Vite HTML transforms. This injects the Vite HMR client, and
// also applies HTML transforms from Vite plugins
html = await server.transformIndexHtml(req.url, html)
res.setHeader('content-type', 'text/html; charset=UTF-8')
res.end(html)
return
}
Expand Down Expand Up @@ -308,6 +309,7 @@ if (import.meta.hot) {
// Apply Vite HTML transforms. This injects the Vite HMR client, and
// also applies HTML transforms from Vite plugins
html = await server.transformIndexHtml(req.url, html)
res.setHeader('content-type', 'text/html; charset=UTF-8')
res.end(html)
return
}
Expand Down

0 comments on commit d805861

Please sign in to comment.