-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(nuxt)!: add NuxtPage to #components
#8145
Conversation
|
β Deploy Preview for nuxt3-docs canceled.
|
packages/nuxt/src/core/nuxt.ts
Outdated
// Add <NuxtPage> | ||
addComponent({ | ||
name: 'NuxtPage', | ||
filePath: resolve(distDir, 'pages/runtime/page') | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should probably only be done in the pages module instead (packages/nuxt/src/pages/module.ts
) - this should not be added if the pages module isn't enabled.
note that we manually register the component here:
framework/packages/nuxt/src/pages/runtime/router.ts
Lines 53 to 56 in 829a550
nuxtApp.vueApp.component('NuxtPage', NuxtPage) | |
// TODO: remove before release - present for backwards compatibility & intentionally undocumented | |
nuxtApp.vueApp.component('NuxtNestedPage', NuxtPage) | |
nuxtApp.vueApp.component('NuxtChild', NuxtPage) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes of course π
.
With the components loader, is the manual register still needed ? π€
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, let's try removing it π€― But let's manually import in the default app.vue
file...
We've just done a very similar thing in #8167 (review).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the release should happens soon (i hope so π), what do you think about removing NuxtChild and NuxtChild too ?
Do you mean this one
<NuxtPage /> |
#components
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed about removing deprecated components. I would do a manual relative import.
#components
Thanks! |
π Linked issue
resolve nuxt/nuxt#14876
β Type of change
π Description
Hi π , this PR adds NuxtPage component to
#components
π Checklist