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(adapter-nuxt): nuxt 3.8 compatibility (DT-1709) #1190

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

lihbr
Copy link
Member

@lihbr lihbr commented Oct 24, 2023

Context

Nuxt 3.8.0 released last week turns TypeScript verbatimModuleSyntax on to accommodate some upstream requirements from Vue.js, see the release note "Type import changes" section: https://github.com/nuxt/nuxt/releases/tag/v3.8.0

Fixes: DT-1709

The Solution

Update Nuxt 3 templates to import Content as a type:

- import { Content } from "@prismicio/client";
+ import { type Content } from "@prismicio/client";

How to QA

  1. Get a Nuxt 3.8.0 project up and running with the latest Slice Machine alpha
  2. Create a slice
  3. Check created slice component, it should have no errors inside it.

Impact / Dependencies

Starters have been updated

Checklist before requesting a review

  • I hereby declare my code ready for review.
  • If it is a critical feature, I have added tests.
  • The CI is successful.
  • If there could backward compatibility issues, it has been discussed and planned.

@vercel
Copy link

vercel bot commented Oct 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
slice-machine ✅ Ready (Inspect) Visit Preview Oct 24, 2023 4:17pm

@lihbr lihbr changed the title fix(adapter-nuxt): nuxt 3.8 compatibility fix(adapter-nuxt): nuxt 3.8 compatibility (DT-1709) Oct 24, 2023
Copy link
Collaborator

@bapmrl bapmrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 When there are only type imports you can also write: import type { Content } from "@prismicio/client.

@lihbr
Copy link
Member Author

lihbr commented Oct 25, 2023

I agree, however since people might want to import other things from @prismicio/client I figured it might be better off this way? No real opinion~

@lihbr lihbr merged commit 220001d into dev-next-release Oct 25, 2023
23 checks passed
@lihbr lihbr deleted the lh/nuxt-3-8-0-compatibility branch October 25, 2023 09:25
@lihbr lihbr mentioned this pull request Oct 25, 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.

2 participants