userback / widget-js

MIT License
4 stars 3 forks source link

Support for NuxtJs (SSR) #29

Closed ervansanjaya closed 1 year ago

ervansanjaya commented 2 years ago

Hi Userback team,

I want to ask if it is possible to integrate with NuxtJs (v2.12.2)?

I have tried to install the Vue version but got this error image

Here's how I implement it /plugins/userback.js image

/nuxt.config.js image

Appreciate any help, thanks!

ervansanjaya commented 2 years ago

Hi @Shard & @lee-userback perharps you guys got some light on this?

Thanks!

Shard commented 2 years ago

Hi @ervansanjaya,

Thanks for bringing this to our attention.

As you mentioned in the title, I think this is an issue with SSR/SSG as we haven't had the chance to create a nuxtjs example and test that functionality yet.

I will put aside some time this week to investigate a bit more and hopefully the fixes are simple enough we can release a new version soon as we do see this as an important use case.

ervansanjaya commented 2 years ago

Thanks for the concern @Shard, I hope we can sort this out soon!

ervansanjaya commented 2 years ago

Hi good day @Shard, just wanted to follow up if you have got a chance to check on this?

Thanks!

agueric commented 2 years ago

Hi! Any update on this? Facing similar issue. @Shard

meirroth commented 2 years ago

I'm interested in NuxtJs support too.

ervansanjaya commented 2 years ago

Hi @Shard, is there any update from this enhancement request please? Thanks

Shard commented 2 years ago

Hi @ervansanjaya

There has been a bit of work committed to develop to add support for nuxt3.

We made an initial attempt to add vue2 and nuxt2 but ran into a few roadblocks with how we initially built the plugin that makes simply attaching the the "global Vue prototype" non trivial.

I am currently working on PR #36 to add vue-demi and change the plugin to use the composition api. When that is done, we will be able to finalize and cut a new 0.2.0 release.

ervansanjaya commented 2 years ago

Glad to hear the updates @Shard

Thank you! I hope we can sort this vue 2 thing as soon as possible

Shard commented 1 year ago

Hey guys,

Support for vue2 has been released in v0.2.0 (#44) under the new package @userback/vue2 🎉

This also includes examples for both nuxt2 and nuxt3 which demonstate how to setup a client side plugin.

If you run into any issues or notice any functionality missing feel free to open another PR.

Cheers.