Skip to content

Conversation

@lihbr
Copy link
Member

@lihbr lihbr commented Jan 2, 2026

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:

This PR updates the Nuxt adapters to adapt to breaking changes coming with the next versions, especially:

  • Helpers (except isFilled) aren't provided by usePrismic() anymore
  • <PrismicEmbed> was removed
  • wrapper props aren't supported anymore.

Question: Should this be ported to https://github.com/prismicio/devtools/tree/main/packages/adapter-nuxt also?

Checklist

  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

@lihbr lihbr requested a review from a team as a code owner January 2, 2026 03:27
@vercel
Copy link

vercel bot commented Jan 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
slice-machine Ready Ready Preview Jan 2, 2026 3:42am

:class="[
'es-alternate-grid__content',
isFilled.image(slice.primary.image)
$prismic.isFilled.image(slice.primary.image)
Copy link
Member Author

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)),
Copy link
Member Author

@lihbr lihbr Jan 2, 2026

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" />
Copy link
Member Author

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>());
Copy link
Member Author

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.

@lihbr lihbr changed the title feat: support Nuxt v5 feat: support Nuxt module v5 Jan 2, 2026
@lihbr lihbr merged commit e87fffc into main Jan 5, 2026
33 checks passed
@lihbr lihbr deleted the lh/nuxt-v5 branch January 5, 2026 08:24
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.

3 participants