undefinedfix
Sign in

In Vue vue.use Introduce Vue in the way of ()- socket.io report errors

kdcwx edited in Wed, 22 Jun 2022

I'm in the webpack + Vue cli environment main.js Introducing Vue in- socket.io And socket.io -The two plug-in codes of client are as follows:

clipboard.png

Browser console error:

clipboard.png

2 Replies
jwal
commented on Wed, 22 Jun 2022
Vue.use(new VueSocketIO({
    debug: true,
    connection: 'http://metinseylan.com:1992',
    vuex: {
        store,
        actionPrefix: 'SOCKET_',
        mutationPrefix: 'SOCKET_'
    }
}))

Read more documents

wpqwi
commented on Wed, 22 Jun 2022

I want to ask you about the introduction of Vue- socket.io Finally, did NPM run build package the project wrong? I prompt to report error JS / chunk vendors. 5ef81a47. JS from uglifyjsunexpected token: punch (() [JS / chunk vendors. 5ef81a47. JS: 849779227]

Did you meet him? How to solve it

lock This question has been locked and the reply function has been disabled.