Skip to content

Commit

Permalink
fix: improve indent of built html file (#4227)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnehcwu committed Jul 14, 2021
1 parent b465d3e commit 0316f14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/plugins/html.ts
Expand Up @@ -545,7 +545,7 @@ function injectToHead(
} else {
// inject before head close
if (headInjectRE.test(html)) {
return html.replace(headInjectRE, `${tagsHtml}\n$&`)
return html.replace(headInjectRE, `${tagsHtml}\n $&`)
}
}
// if no <head> tag is present, just prepend
Expand Down Expand Up @@ -592,7 +592,7 @@ function serializeTags(tags: HtmlTagDescriptor['children']): string {
if (typeof tags === 'string') {
return tags
} else if (tags) {
return tags.map(serializeTag).join(`\n `)
return ` ${tags.map(serializeTag).join('\n ')}`
}
return ''
}
Expand Down

0 comments on commit 0316f14

Please sign in to comment.