Skip to content

Commit

Permalink
test(html): do not wrap duplicated html (vitejs#11515)
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework authored and futurGH committed Feb 26, 2023
1 parent 801bc7f commit d5658fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions playground/html/vite.config.js
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 d5658fc

Please sign in to comment.