Skip to content

Commit

Permalink
fix: vite index.html content-type (#5110)
Browse files Browse the repository at this point in the history
  • Loading branch information
dashdotdawn committed Jan 6, 2022
1 parent 7973ef1 commit 7f4faad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/vite-service/src/plugins/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const htmlPlugin = ({ filename, template, entry, rootDir, templateParamet

if (req.url === `/${filename}`) {
try {
res.setHeader('Content-Type','text/html');
res.end(await server.transformIndexHtml(req.url, html));
} catch (e) {
return next(e);
Expand Down

0 comments on commit 7f4faad

Please sign in to comment.