Skip to content

Commit

Permalink
test(html): do not wrap duplicated html (#11515)
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework authored Dec 29, 2022
1 parent 2c38bae commit 7d20580
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions playground/html/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ module.exports = {
if (html.includes('/@vite/client')) {
throw new Error('pre transform applied at wrong time!')
}

const doctypeRE = /<!doctype html>/i
if (doctypeRE.test(html)) return

const head = `
<head lang="en">
<meta charset="UTF-8">
Expand Down

0 comments on commit 7d20580

Please sign in to comment.