Skip to content

Commit 1b54e50

Browse files
fix(html): allow unexpected question mark in tag name (#18852)
1 parent 7de7c5b commit 1b54e50

File tree

1 file changed

+4
-0
lines changed
  • packages/vite/src/node/plugins

1 file changed

+4
-0
lines changed

packages/vite/src/node/plugins/html.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,10 @@ function handleParseError(
308308
case 'non-void-html-element-start-tag-with-trailing-solidus':
309309
// Allow self closing on non-void elements #10439
310310
return
311+
case 'unexpected-question-mark-instead-of-tag-name':
312+
// Allow <?xml> declaration and <?> empty elements
313+
// lit generates <?>: https://github.com/lit/lit/issues/2470
314+
return
311315
}
312316
const parseError = formatParseError(parserError, filePath, html)
313317
throw new Error(

0 commit comments

Comments
 (0)