Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

feat(nuxt)!: add NuxtPage to #components - #8145

Merged
pi0 merged 5 commits into
nuxt:mainfrom
huang-julien:feat/#component_NuxtPage
Oct 14, 2022
Merged

feat(nuxt)!: add NuxtPage to #components#8145
pi0 merged 5 commits into
nuxt:mainfrom
huang-julien:feat/#component_NuxtPage

Conversation

@huang-julien

Copy link
Copy Markdown
Member

🔗 Linked issue

resolvenuxt/nuxt#14876

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Hi 🙂 , this PR adds NuxtPage component to #components

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@codesandbox

Copy link
Copy Markdown

CodeSandbox logoCodeSandbox logo Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@netlify

netlifyBot commented Oct 12, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit6beb099
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/6348979d5769a900092ef0c7

Comment threadpackages/nuxt/src/core/nuxt.ts Outdated
Comment on lines +160 to +164
// Add <NuxtPage>
addComponent({
name: 'NuxtPage',
filePath: resolve(distDir, 'pages/runtime/page')
})

Copy link
Copy Markdown
Member

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:

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)

Copy link
Copy Markdown
MemberAuthor

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 ? 🤔

Copy link
Copy Markdown
Member

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).

Copy link
Copy Markdown
MemberAuthor

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

with a manual import from #components ?

@danielroedanielroeOct 13, 2022

Copy link
Copy Markdown
Member

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.

@danielroe
danielroe self-requested a review October 13, 2022 08:46
@danielroedanielroe changed the title feat(nuxt): add NuxtPage to #componentsfeat(nuxt)!: add NuxtPage to #componentsOct 13, 2022
pi0
pi0 approved these changes Oct 13, 2022
Comment threadpackages/nuxt/src/pages/runtime/app.vue Outdated
@pi0
pi0 merged commit 23ad303 into nuxt:mainOct 14, 2022
@pi0

pi0 commented Oct 14, 2022

Copy link
Copy Markdown
Member

Thanks!

@pi0pi0 mentioned this pull request Oct 18, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

components.d.ts file does not contain NuxtPage components

3 participants

@huang-julien@pi0@danielroe