diff --git a/packages/vite/src/node/plugins/html.ts b/packages/vite/src/node/plugins/html.ts
index 8cc65619fd81cd..ae3f56c6bd7dff 100644
--- a/packages/vite/src/node/plugins/html.ts
+++ b/packages/vite/src/node/plugins/html.ts
@@ -43,7 +43,7 @@ interface ScriptAssetsUrl {
const htmlProxyRE = /\?html-proxy[&inline\-css]*&index=(\d+)\.(js|css)$/
const inlineCSSRE = /__VITE_INLINE_CSS__([^_]+_\d+)__/g
-const htmlLangRE = /.(html|htm)$/
+const htmlLangRE = /\.(html|htm)$/
const inlineImportRE = /\bimport\s*\(("[^"]*"|'[^']*')\)/g
export const isHTMLProxy = (id: string): boolean => htmlProxyRE.test(id)