Git Product home page Git Product logo

Comments (3)

walaszczykm avatar walaszczykm commented on July 29, 2024

Hello @kid-github 👋

As stated in the @livechat/widget-vue package README:

This library allows to render and interact with the LiveChat Chat Widget inside a Vue 3 application.

It can also be seen from peer dependencies in package.json:

This means that we currently support only Vue 3 applications. Vue 3 is currently the main supported version of the library. We may enhance support for the LiveChatWidegt component to Vue 2 but it will not be a high priority for us at the moment. Hooks exported from the package will not be compatible with Vue 2 as they are based on the Compistion API introduced in the Vue 3.

From your screenshot, I can see that in the first place you have used our Chat Widget snippet code directly in your HTML document. This way of integrating Chat Widget with your website is not directly a topic of this project and it should work out of the box for every website. You can read more about it here: https://www.livechat.com/help/setting-up-livechat-on-your-website/.

Could you please provide more details about the issue on your website by embedding the Chat Widget directly in the HTML?

from chat-widget-adapters.

walaszczykm avatar walaszczykm commented on July 29, 2024

Hello, @kid-github once again 👋

I have looked into this issue and analyzed the reasons for incompatibility. Although the lack of support for the new Composition API is obvious as this is a Vue 3 specific feature, the main LiveChatWidget component looked like it could work on both Vue 2 and Vue 3. As long as the component is defined using Options API and not Composition API it will work on both Vue 2 and 3. And indeed it was defined like that but for rich TypeScript support in Vue 3 apps, the component is defined using defineComponent function imported from vue@3 package. This couldn’t work in-app using Vue 2 and missing Vue 3 package. But as usage of this function is not required for runtime in Vue 2 I was able to create a dedicated build pipeline and export this component as plain object export under dedicated submodule @livechat/widget-vue/v2. From my tests, it looks that it indeed now works properly on both Vue 2 and Vue 3 apps 🙂

You can look into a PR for more information and implementation details: #28

from chat-widget-adapters.

walaszczykm avatar walaszczykm commented on July 29, 2024

The PR was merged. Changes will be available with the next released version 🙂

from chat-widget-adapters.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.