mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
feat(nuxt3): allow overriding root component using app.root.vue
(#3733)
This commit is contained in:
parent
fb150825ce
commit
91fd16ae52
@ -63,8 +63,10 @@ export async function resolveApp (nuxt: Nuxt, app: NuxtApp) {
|
||||
app.mainComponent = tryResolveModule('@nuxt/ui-templates/templates/welcome.vue')
|
||||
}
|
||||
|
||||
// Default root component
|
||||
app.rootComponent = resolve(nuxt.options.appDir, 'components/nuxt-root.vue')
|
||||
// Resolve root component
|
||||
if (!app.rootComponent) {
|
||||
app.rootComponent = await findPath(['~/app.root', resolve(nuxt.options.appDir, 'components/nuxt-root.vue')])
|
||||
}
|
||||
|
||||
// Resolve error component
|
||||
if (!app.errorComponent) {
|
||||
|
Loading…
Reference in New Issue
Block a user