feat(vue-renderer): add head <base> meta for spa (#7170)

This commit is contained in:
Jimmy 2020-04-07 11:11:00 +02:00 committed by GitHub
parent 20f086d0ce
commit 6b1faaed80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,6 +77,11 @@ export default class SPARenderer extends BaseRenderer {
m.script.text() +
m.noscript.text()
// Add <base href=""> meta if router base specified
if (this.options._routerBaseSpecified) {
meta.HEAD += `<base href="${this.options.router.base}">`
}
// BODY_SCRIPTS (PREPEND)
meta.BODY_SCRIPTS_PREPEND =
m.meta.text({ pbody: true }) +