[Vuejs]-Import a node module in Vue.js CLI instance

0👍

Open the terminal in your project root folder, then install the package:

npm install botui --save

Then open src/main.js in your text editor and add this:

import Vue from 'vue'
import BotUI from 'botui'

const botui = BotUI('my-botui-app', {
  vue: Vue // pass the dependency.
})

This will create a botui instance. But that instance won’t have any messages in it. You can check that it’s working by adding a message:

botui.message.bot('Hello, how can I help?')
👤Ikbel

Leave a comment