Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nuxt): definePageMeta in "pages:extend" #19966

Closed

Conversation

huang-julien
Copy link
Member

@huang-julien huang-julien commented Mar 28, 2023

πŸ”— Linked issue

#19955

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 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)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Hi πŸ‘‹ , this PR add the result of the page:extend hook so pages added within modules can be also transformed.

πŸ“ Checklist

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

@codesandbox
Copy link

codesandbox bot commented Mar 28, 2023

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

Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are fast!! πŸ”₯

The main issue I see here is that the page routes may change after the initial modules are loaded, for example if the user adds new files to the pages directory or there is some custom logic within a user pages:extend hook that changes.

@huang-julien
Copy link
Member Author

huang-julien commented Mar 28, 2023

I see... then should we just transform both dirs and pages ?
at module:before ?

@huang-julien huang-julien marked this pull request as draft March 28, 2023 19:35
@huang-julien huang-julien marked this pull request as ready for review April 16, 2023 18:08
@danielroe danielroe added this to the v3.5 milestone May 2, 2023
@danielroe
Copy link
Member

While reviewing, it occurred to me we could take the opportunity to rework how the page meta plugin works, which should improve performance more generally by having less parsing of the code. I've opened a PR at #20628. Would love your thoughts... πŸ™

@huang-julien
Copy link
Member Author

closing in favor of #20628

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants