Add base href every time

This commit is contained in:
Sebastien Chopin 2017-05-16 15:56:46 +02:00
parent 78d219c473
commit 971372d763

View File

@ -94,9 +94,7 @@ export async function renderRoute (url, context = {}) {
}
const m = context.meta.inject()
let HEAD = m.meta.text() + m.title.text() + m.link.text() + m.style.text() + m.script.text() + m.noscript.text()
if (self.options.router.base !== '/') {
HEAD += `<base href="${self.options.router.base}">`
}
HEAD += `<base href="${self.options.router.base}">`
HEAD += context.renderResourceHints() + context.renderStyles()
APP += `<script type="text/javascript">window.__NUXT__=${serialize(context.nuxt, { isJSON: true })}</script>`
APP += context.renderScripts()