Skip to content

Conversation

@VedantMadane
Copy link

Fixes #10997. Vite now properly handles .htm files. Updated htmlFallback, static, indexHtml, and memoryFiles middlewares to use the existing htmlLangRE regex that matches both .html and .htm extensions.

Fixes vitejs#10997

Vite now properly handles .htm files in addition to .html files.
This includes:
- Export htmlLangRE from plugins/html.ts for reuse
- Update htmlFallback middleware to check for both .html and .htm
- Update static middleware to skip .htm files (handled elsewhere)
- Update indexHtml middleware to process .htm files
- Update memoryFiles middleware to forward .htm files

This change ensures .htm files are treated consistently with .html
files throughout the dev server.
@sapphi-red sapphi-red marked this pull request as draft January 19, 2026 09:34
@VedantMadane
Copy link
Author

@sapphi-red when should this PR be marked ready for review?

@sapphi-red
Copy link
Member

When the CI passes

@VedantMadane VedantMadane marked this pull request as ready for review January 26, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants