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

fix(nuxt): ensure typed layout prop persists through build #22855

Merged
merged 2 commits into from
Aug 27, 2023

Conversation

94726
Copy link
Contributor

@94726 94726 commented Aug 27, 2023

πŸ”— Linked issue

#22847

❓ 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

The issue started because of 0d9a0b7. For some reason the ? makes it so that the type is changed. I have no idea why but this seems to fix it. Would appreciate an explaination if someone knows why :)
To me, it looks like a bug of unbuild/dts generation.
Maybe not a bug per se, but it looks like it tries to evaluate the type at build time and in this case probably doesn't find PageMeta?

πŸ“ Checklist

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

@stackblitz
Copy link

stackblitz bot commented Aug 27, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

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.

This looks good. You're right that it's an upstream issue in mkdist that we likely need to resolve there as well. Likely will be solved in unjs/mkdist#154.

@danielroe danielroe changed the title fix(nuxt): typed layout name fix(nuxt): ensure typed layout prop persists through build Aug 27, 2023
@danielroe danielroe merged commit a256c87 into nuxt:main Aug 27, 2023
25 checks passed
@github-actions github-actions bot mentioned this pull request Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants