fix(vue-app): use correct `$config` for finding basePath (#9706)

This commit is contained in:
Daniel Roe 2021-08-24 10:54:24 +02:00 committed by GitHub
parent 0145578493
commit 3c10f176e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ const createNext = ssrContext => (opts) => {
return
}
let fullPath = withQuery(opts.path, opts.query)
const $config = ssrContext.runtimeConfig || {}
const $config = ssrContext.nuxt.config || {}
const routerBase = ($config._app && $config._app.basePath) || '<%= router.base %>'
if (!fullPath.startsWith('http') && (routerBase !== '/' && !fullPath.startsWith(routerBase))) {
fullPath = joinURL(routerBase, fullPath)