-
Notifications
You must be signed in to change notification settings - Fork 53
feat: support Nuxt module v5 #1760
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| :class="[ | ||
| 'es-alternate-grid__content', | ||
| isFilled.image(slice.primary.image) | ||
| $prismic.isFilled.image(slice.primary.image) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like with components, Nuxt users should prefer using the auto imported version of isFilled for consistency.
| description: page.value?.data.meta_description, | ||
| ogDescription: page.value?.data.meta_description, | ||
| ogImage: computed(() => prismic.asImageSrc(page.value?.data.meta_image)), | ||
| ogImage: computed(() => asImageSrc(page.value?.data.meta_image)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Helpers like asImageSrc is no longer provided by usePrismic() and should be imported explicitly.
| code: await format( | ||
| stripIndent` | ||
| <PrismicEmbed :field="${dotPath(fieldPath)}" /> | ||
| <div v-html="${dotPath(fieldPath)}?.html" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<PrismicEmbed> (deprecated) was removed.
| defineProps(getSliceComponentProps<Content.${pascalName}Slice>( | ||
| ["slice", "index", "slices", "context"] | ||
| )); | ||
| defineProps(getSliceComponentProps<Content.${pascalName}Slice>()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those hints are noise and I wouldn't recommend adding them anymore. Especially with TypeScript it's much more pleasant to get slices bootstrapped like this.
Resolves:
Important
Those changes are backward compatible. This PR can be merged and released whenever ready. It should be released before we release updated SDK.
Description
We've been working on the next major of Vue and Nuxt SDKs and are getting ready to releasing them:
@prismicio/vuerefactor!: rework Vue plugin prismic-vue#89@nuxtjs/prismicrefactor!: simplify module nuxt-modules/prismic#235This PR updates the Nuxt adapters to adapt to breaking changes coming with the next versions, especially:
isFilled) aren't provided byusePrismic()anymore<PrismicEmbed>was removedwrapperprops aren't supported anymore.Question: Should this be ported to https://github.com/prismicio/devtools/tree/main/packages/adapter-nuxt also?
Checklist
Preview
How to QA 1
Footnotes
Please use these labels when submitting a review:
⚠️ #issue: Strongly suggest a change.
❓ #ask: Ask a question.
💡 #idea: Suggest an idea.
🎉 #nice: Share a compliment. ↩