Do NOT ignore this template or your issue will have a very high chance to be closed without comment.
Describe the bug
Transforming index.html sets Content-Type: application/javascript for index.html.
Should be text/html.
Reproduction
Please provide a link to a repo that can reproduce the problem you ran into.
const server = vite.createServer({
...options,
transforms: [{
test: ({ id }) => id === '/',
transform: ({ code }) => code.replace('__SCRIPT__', '<script>...</script>')
}],
}).listen(3000)
System Info
- required
vite version: 1.0.0-beta.11
- required Operating System: Windows
- required Node version: 12.14.1
Logs (Optional if provided reproduction)
[vite] failed to parse / for import rewrite.
If you are using JSX, make sure to named the file with the .jsx extension.
Describe the bug
Transforming
index.htmlsetsContent-Type: application/javascriptforindex.html.Should be
text/html.Reproduction
Please provide a link to a repo that can reproduce the problem you ran into.
System Info
viteversion: 1.0.0-beta.11Logs (Optional if provided reproduction)