From d5658fc23e3289d15dd731f674f5fa907a5ce816 Mon Sep 17 00:00:00 2001 From: fi3ework Date: Thu, 29 Dec 2022 11:29:54 +0800 Subject: [PATCH] test(html): do not wrap duplicated html (#11515) --- playground/html/vite.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playground/html/vite.config.js b/playground/html/vite.config.js index b3944966fcccc2..4d029b1e835d26 100644 --- a/playground/html/vite.config.js +++ b/playground/html/vite.config.js @@ -41,6 +41,10 @@ module.exports = { if (html.includes('/@vite/client')) { throw new Error('pre transform applied at wrong time!') } + + const doctypeRE = //i + if (doctypeRE.test(html)) return + const head = `