fix(vue-renderer): ensure custom build indicator preserves some whitespace (#9705)

This commit is contained in:
Daniel Roe 2021-08-24 11:10:14 +02:00 committed by GitHub
parent 3c10f176e6
commit b0147772ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,7 +153,8 @@ export default class VueRenderer {
if (await fs.exists(loadingHTMLPath)) {
this.serverContext.resources.loadingHTML = await fs.readFile(loadingHTMLPath, 'utf8')
this.serverContext.resources.loadingHTML = this.serverContext.resources.loadingHTML.replace(/\r|\n|[\t\s]{3,}/g, '')
this.serverContext.resources.loadingHTML =
this.serverContext.resources.loadingHTML.replace(/\r|\n/g, ' ').replace(/[\t\s]+/g, ' ')
} else {
this.serverContext.resources.loadingHTML = ''
}