Skip to content

Commit 7d20580

Browse files
authored
test(html): do not wrap duplicated html (#11515)
1 parent 2c38bae commit 7d20580

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

playground/html/vite.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ module.exports = {
4141
if (html.includes('/@vite/client')) {
4242
throw new Error('pre transform applied at wrong time!')
4343
}
44+
45+
const doctypeRE = /<!doctype html>/i
46+
if (doctypeRE.test(html)) return
47+
4448
const head = `
4549
<head lang="en">
4650
<meta charset="UTF-8">

0 commit comments

Comments
 (0)