nuxt-supabase
nuxt-supabase copied to clipboard
Nuxt 3 support
Hi! Currently, we are listing nuxt-supabase
as official Nuxt+Supabase integration. Thanks for your works @scottrobertson @sduduzog
Nuxt 3 beta is out for a while and @wobsoriano already started a nice Supabase module for Nuxt 3 (nuxt3-supabase)
I would like to see if possible, we collaborate together to make a new Major version of this module for Nuxt 3 and Nuxt 2 Bridge support in a single place (superbase-community) to ensure it keeps maintained in good hands 💚
@wobsoriano If you could make an initial PR, I and @Atinux can help to make it stable.
I believe this already works perfectly on nuxt3 but @sduduzog will know for sure.
I believe the current version should work with Nuxt 2 bridge (based on vue2) but not Nuxt 3:
- Vue plugin registration is different between Vue 2 and Vue 3 (
Vue.use
vsapp.use
) - Modules need to be created with
@nuxt/kit
(however there is a legacy container for backward compatibility) - Native ESM baseline is required (https://v3.nuxtjs.org/concepts/esm)
Also, it would be nice by starting to support the bridge, Nuxt module exports composable other than basic injected $supabase
. SSR authentication handling could be improved also.
Ah yeah sorry, I was getting confused with the Vue3 support we added in https://github.com/supabase-community/vue-supabase which this library uses.
Shouldn't be too much work to get it working, since this Nuxt wrapper is super simple.
@scottrobertson @pi0 I"m seeing this now. Yes, the current version works with the nuxt-bridge (although no migration is yet done there), but is not yet ready for nuxt 3. I've taken some time to read through nuxt3-supabase and I love what he'd done with the project and I'll try as much as possible to also help where I can
@sduduzog how do you want to handle this? Do you want to build it, or should @wobsoriano PR in some changes if they like?
I am guessing we need to either carry on supporting both 2 and 3, or have a new major release that is 3 only. The latter may be the easier but not as nice for bug fixes etc for us going forward.
Thanks for your quick responses! We are working on a simplified example at the moment for nuxt3+supabase. Will ping you when ready and probably follow up with a PR to convert it back into the module.
I am guessing we need to either carry on supporting both 2 and 3, or have a new major release that is 3 only.
Agreed. Regarding versioning, same as other nuxt modules, it worth a major version to directly target Nuxt3. Nuxt2 users can be hopefully still use latest as long as using Nuxt bridge (that makes CompositionAPI and even small vue3 compatibility).
@pi0 @sduduzog I can focus on nuxt 2 and the nuxt bridge in the meantime
Hello everyone :wave:
I have opened two PRs to address this issue:
- a minor update to
vue-supabase
that enables the nuxt integration (see PR) - an update to
nuxt-supabase
to handle running on Nuxt Bridge (see #15)
I would love to have your feedback on it, and know what are the next steps to hopefully get the PRs merged. :crossed_fingers:
I'm pretty new to OSS so there's probably a couple things that are still off—just let me know!
Cheers,