-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support parsing .htm as same as .html #10997
Comments
It seems there's many places using |
Hello @PeyaPeyaPeyang. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it! |
I've made a PR for this: #11001 |
I think it's a nice to have if it's simple to support, but with the html fallback this makes it a bit complicated.
It feels like it would bring a lot of legacy extensions handling for a modern tool. |
I think |
A situation where |
Oh, I didn't think of the SPA fallback. vite/packages/vite/src/node/preview.ts Lines 115 to 126 in a03860f
I guess |
This issue happens for any non-html extension. I ran into it trying to get it to export a .aspx file so that I could run it on the server in ASP.NET and send it to the user with data pre-populated. I fixed it in a similar method to the user above, searching vite's I'd suggest that whoever fixes this for the project modify that line to allow any extension that's being used in the |
It would also help with support for non-html file types like This would also help resolve #8000 |
Description
We are currently working on a rebuild of our old website.
I included the .htm file in the build target for now, but the build failed with a Parse error.
.htm files are rendered correctly in most modern browsers.
According to RFC2854 and this IANA text, .html and .htm are commonly used HTML extensions and I believe they should be used in vite.
It is a small thing, but I think it will be useful.
Also, I found a regular expression in the HTML plugin file that seems to support .htm, but it is not actually supported.
If the suggestion in this Issue is not good, why is this regex in there?
Suggested solution
Actual works method
in
node/plugins/html/ts:301
to
Alternative
No response
Additional context
Parse error I got:
Validations
The text was updated successfully, but these errors were encountered: