nik-zp / Vue-Mqtt

Connect to mqtt through websocket, implementation for Vuejs 2
95 stars 33 forks source link

Vue3 support #19

Open Onixarts opened 3 years ago

Onixarts commented 3 years ago

Is this project still maintained? It not works with Vue 3.

grzegorz-uniti commented 3 years ago

Long time - no reply. I am also interested in Vue 3 support.

grzegorz-uniti commented 3 years ago

Ok, i found a solution. Change in node_modules/vue-mqtt/src/Main.js line 12 to Vue.config.globalProperties.$mqtt = observer.Mqtt; and recompile module. It's working now :)

bluelemonade commented 2 years ago

that sound great, how can I recompile the module, I tried npm rebuild, but the dist didn't change.

Onixarts commented 2 years ago

Well, I have removed vue-mqtt and just use raw mqttjs. Works fine :).

tommy44458 commented 1 year ago

Hi, you can streamline your Vue3 project with mqtt-vue-hook - the easy-to-use TypeScript library for MQTT broker connections and callback function management :). (https://github.com/tommy44458/mqtt-vue-hook)