Skip to content

fix(nuxt): preserve route metadata assigned outside page#27587

Merged
danielroe merged 9 commits intomainfrom
fix/page-meta
Jun 13, 2024
Merged

fix(nuxt): preserve route metadata assigned outside page#27587
danielroe merged 9 commits intomainfrom
fix/page-meta

Conversation

@danielroe
Copy link
Copy Markdown
Member

@danielroe danielroe commented Jun 13, 2024

🔗 Linked issue

resolves #27577
resolves #27547

📚 Description

This handles a regression introduced in scanPageMeta whereby we were not preserving route metadata assigned at build-time when any route meta was dynamic...

I've also bundled another fix which resolves #27585, where we were not processing page metadata that was within another function, such as if someone put it inside a setup() function. While we wouldn't recommend doing that, it can break existing code as we previously allowed this.

@bolt-new-by-stackblitz
Copy link
Copy Markdown

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

Comment thread packages/nuxt/test/page-metadata.test.ts Fixed
Comment thread test/fixtures/basic/nuxt.config.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants