Using Vue UI Kit, you can integrate your Nuxt.js application with CometChat.
Pre-requisites
First, if not already installed, add Vue from your terminal using the following command.
Install CometChat SDK
use the following command
Include Vue UI Kit
- Copy the cloned repository to your pages folder
- Copy all the dependencies from package.json into your project’s package.js and install them
Build Chat component
Create Chat.vue file in your pages folder with the following code
Replace APP_ID, REGION, and AUTH_KEY with your CometChat App ID, Region, and in the below code.
Create consts.js file with ComeChat details at root level
Create CometChatNoSSR.vue component at **root **level
Replace UID in the below code.
Add Webpack config to compile sound files in nuxt.config.js