We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3544244 commit 5e45cf4Copy full SHA for 5e45cf4
npm/vite-dev-server/src/plugins/cypress.ts
@@ -134,12 +134,13 @@ export const Cypress = (
134
newHtml = `${indexHtmlContent}
135
<script>${loader}</script>`
136
} else {
137
- // Insert before closing body tag
138
- newHtml = `
139
- ${indexHtmlContent.substring(0, endOfBody)}
+ // Insert before closing body tag without extra leading whitespace
+ const beforeBody = indexHtmlContent.substring(0, endOfBody)
+ const afterBody = indexHtmlContent.substring(endOfBody)
140
+
141
+ newHtml = `${beforeBody}
142
<script>${loader}</script>
- ${indexHtmlContent.substring(endOfBody)}
- `
143
+${afterBody}`
144
}
145
146
return newHtml
0 commit comments