mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 06:05: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')
|
app.mainComponent = tryResolveModule('@nuxt/ui-templates/templates/welcome.vue')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default root component
|
// Resolve root component
|
||||||
app.rootComponent = resolve(nuxt.options.appDir, 'components/nuxt-root.vue')
|
if (!app.rootComponent) {
|
||||||
|
app.rootComponent = await findPath(['~/app.root', resolve(nuxt.options.appDir, 'components/nuxt-root.vue')])
|
||||||
|
}
|
||||||
|
|
||||||
// Resolve error component
|
// Resolve error component
|
||||||
if (!app.errorComponent) {
|
if (!app.errorComponent) {
|
||||||
|
Loading…
Reference in New Issue
Block a user