Nuxt support with payload v3 #5915
Replies: 3 comments 6 replies
-
Hey @casualmatt, Thanks for posting your questions here! Your comment nudged me to remember that we had a PR for the live-preview feature for vue that needed to be merged. A special thanks to @ChrisGV04 on the help with that. I've only done a little bit of Vue prior to building Payload, so I may need backup the Vue users in our contributors here.
Since Nuxt can also work with server components, the answer is no. You can do anything with Nuxt that you can do with Next. The only difference is that Payload needs to have next at the moment to build and serve the admin UI and APIs leading to a bit larger of an app footprint having both.
I'm not familiar with Nitro, this sounds like something you could experiment with. I'm not sure if this could be implemented in a way that wraps the current Next endpoint handling for the API requests. To make the routing go through Nuxt, you would have to probably build a similar package to our
We fully expect people to continue building frontends with Vue on top of Nuxt as people in the community have been doing. We even have the live-preview package ready to let you render your Vue frontend and see the outcome of your edits live in the admin interface. I'd love to see a community contribution of a Nuxt/Payload project in our own examples along with a community blog post. I am sure people coming from Vue would find this very useful. The end of the road for us on Vue support that isn't likely to change, is that the admin UI is totally based on React and so writing custom Vue components to work within the admin UI isn't an option. Outside of that, you can really do whatever you want to integrate Payload with other frameworks. I'd love to hear your thoughts on all this and especially any easy wins where Payload can extend the olive branch to the Vue community to be a more open product. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi @casualmatt, I am also looking into integrating Nuxt with Payload. I tested a straightforward approach where i run payload and Nuxt with the same payload config and use payload inside the Nuxt server routes as an ORM, which gets me the type information on the backend aswell as the frontend with useFetch. This works in a (very) simple test case inside Nuxt without hitting any immediate blocks with Next/Nuxt compatibility: https://github.com/devkon-at/test-nuxt-payload I think that this could be amazing for the Nuxt/vue community especially given your experience with Directus, please update your post if you think about building something like this. |
Beta Was this translation helpful? Give feedback.
-
Had the same "issue", just wanted to consume the content from Payload into a Nuxt/Vue-based application, while re-using some stuff like Prose-components and custom block mapping. So a simple headless CMS -> API -> Site flow. Came up with a small prototype that outlines how one could use the RichText/Lexical field with custom blocks. As example I use it to map the Nuxt UI Alert component to a custom block in the REST API output given by Payload. It also skips on most of the heavy dependencies. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Super fresh in the payload world; I used supabase, strapi, and directus in the past, predominantly with Nuxt.
What will be the support for Nuxt with payload v3?
Ty, for your time and thoughts in advance.
Matt.
PS: I'm one of the maintainers of the Directus-Nuxt module, so if there needs to be a Payload module, I'm open to it.
Beta Was this translation helpful? Give feedback.
All reactions