Comments (3)
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.
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.
The PR was merged. Changes will be available with the next released version 🙂
from chat-widget-adapters.
Related Issues (20)
- Optimize external scripts HOT 2
- Color Change on react js HOT 1
- Question: How to use with Custom Identity Provider? HOT 2
- Set LiveChat Customer Avatar HOT 1
- Angular v15 update HOT 4
- Angular v15 update HOT 2
- Add SvelteKit Support HOT 1
- Intermittent white bar on bottom on mobile devices HOT 1
- Angular Adaptor Event Handlers
- uniapp require is not defined.
- hook to open the chat from a button or event
- Update window types
- Support Angular 16 HOT 1
- Programmatically start chat HOT 2
- asyncInit incorportation
- visibility="minimized" do hide chat icon in mobile view. HOT 1
- Cannot read properties of null (reading 'useRef')
- Hooks for interacting with the widget
- How to get baseAPI when use customIdentityProvider
- Minimised hides the vue chat widget, if the support is offline. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chat-widget-adapters.