fix(nuxt): router defaults overwrite custom options always (#8334)

This commit is contained in:
Johann Schopplich 2022-10-19 16:48:16 +02:00 committed by GitHub
parent 0106e09e32
commit 7b16719649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,7 +145,7 @@ export default defineNuxtModule({
))).filter(Boolean) as string[]
// Add default options
routerOptionsFiles.unshift(resolve(runtimeDir, 'router.options'))
routerOptionsFiles.push(resolve(runtimeDir, 'router.options'))
const configRouterOptions = genObjectFromRawEntries(Object.entries(nuxt.options.router.options)
.map(([key, value]) => [key, genString(value as string)]))