mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(nuxt): add router.options files in definite order (#25397)
This commit is contained in:
parent
c51272099f
commit
a42aaecfb5
@ -38,10 +38,10 @@ export default defineNuxtModule({
|
||||
// Add default options
|
||||
context.files.push({ path: resolve(runtimeDir, 'router.options'), optional: true })
|
||||
|
||||
await Promise.all(nuxt.options._layers.map(async layer => {
|
||||
for (const layer of nuxt.options._layers) {
|
||||
const path = await findPath(resolve(layer.config.srcDir, 'app/router.options'))
|
||||
if (path) { context.files.push({ path }) }
|
||||
}))
|
||||
}
|
||||
|
||||
await nuxt.callHook('pages:routerOptions', context)
|
||||
return context.files
|
||||
|
Loading…
Reference in New Issue
Block a user