Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

263
Visualizações
integrated whatsapp-web.js with vuejs

I'm new to vuejs ..

I don't understand how to link this vue js and whatapp-web.js

https://github.com/pedroslopez/whatsapp-web.js

install

vue init webpack-simple whatsapp-vue
cd whatsapp-vue
npm i whatsapp-web.js
npm install
npm run dev

main.js

import Vue from 'vue'
import App from './App.vue'
const { Client } = require('whatsapp-web.js');
const client = new Client();

new Vue({
  el: '#app',
  render: h => h(App)
})

i got error when npm run dev

client?cd17:167 ./node_modules/whatsapp-web.js/index.js
Module parse failed: Unexpected token (24:4)
You may need an appropriate loader to handle this file type.
|     List: require('./src/structures/List'),
|     Buttons: require('./src/structures/Buttons'),
|     ...Constants
| };
| 
 @ ./src/main.js 4:15-41
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js

but it works with momentjs

enter image description here

can someone help me with example ?

thank you

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda