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(schema): allow adding page routes without a matching file #19173

Merged
merged 9 commits into from Mar 3, 2023

Conversation

rebyatyonok
Copy link
Contributor

@rebyatyonok rebyatyonok commented Feb 20, 2023

πŸ”— Linked issue

#19115

❓ 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

Resolves #19115

Makes NuxtPage.file optional.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly (there is no need?).

@codesandbox
Copy link

codesandbox bot commented Feb 20, 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.

Type check is (rightly) picking up some issues where we need to confirm that pages do have a file, for example in getSources and in generating route metadata.

Would you be able to update those places as well to filter out routes without associated files?

@rebyatyonok
Copy link
Contributor Author

Yeah, sure

@danielroe danielroe dismissed their stale review March 3, 2023 13:34

implemented

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.

Thank you! ❀️

I pushed a few refactors to the route generation utility that were unrelated to your work (your implementation was good πŸ‘Œ) which should hopefully improve the quality of the generated routes.

@danielroe danielroe changed the title fix(schema): NuxtPage.file is optional feat(schema): allow adding routes without a matching file via pages:extend Mar 3, 2023
@danielroe danielroe changed the title feat(schema): allow adding routes without a matching file via pages:extend feat(schema): allow adding page routes without a matching file Mar 3, 2023
@danielroe danielroe merged commit 7131aef into nuxt:main Mar 3, 2023
@rebyatyonok
Copy link
Contributor Author

@danielroe you're welcome, was glad to help ❀️

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.

Defining a route (NuxtPage) requires a file, but a redirect does not need a file
2 participants