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

Nuxt 3 support #14

Open
pi0 opened this issue Nov 20, 2021 · 8 comments
Open

Nuxt 3 support #14

pi0 opened this issue Nov 20, 2021 · 8 comments

Comments

@pi0
Copy link

pi0 commented Nov 20, 2021

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.

@scottrobertson
Copy link
Contributor

I believe this already works perfectly on nuxt3 but @sduduzog will know for sure.

@pi0
Copy link
Author

pi0 commented Nov 20, 2021

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 vs app.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.

@scottrobertson
Copy link
Contributor

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.

@sduduzog
Copy link
Collaborator

sduduzog commented Nov 21, 2021

@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

@scottrobertson
Copy link
Contributor

@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.

@pi0
Copy link
Author

pi0 commented Nov 22, 2021

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).

@sduduzog
Copy link
Collaborator

@pi0 @sduduzog I can focus on nuxt 2 and the nuxt bridge in the meantime

@Strift
Copy link
Contributor

Strift commented Dec 21, 2021

Hello everyone 👋

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 Add support for Nuxt Bridge #15)

I would love to have your feedback on it, and know what are the next steps to hopefully get the PRs merged. 🤞

I'm pretty new to OSS so there's probably a couple things that are still off—just let me know!

Cheers,

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

No branches or pull requests

4 participants