I am in the environment of webpack+vue-cli
introduce vue-socket.io and socket.io-client plug-ins into main.js as follows:
:
I am in the environment of webpack+vue-cli
introduce vue-socket.io and socket.io-client plug-ins into main.js as follows:
:
Vue.use(new VueSocketIO({
debug: true,
connection: 'http://metinseylan.com:1992',
vuex: {
store,
actionPrefix: 'SOCKET_',
mutationPrefix: 'SOCKET_'
}
}))
read more documents
I would like to ask you if there was a mistake when your project was introduced into the vue-socket.io final npm run build packaging project? I prompt js/chunk-vendors.5ef81a47.js from UglifyJs
Unexpected token: punc (() [js/chunk-vendors.5ef81a47.js:84977,9227]
did you meet it? How to solve it
how vue uses websocket <script> export default { data() { return { websock: null, } }, methods: { threadPoxi(){ const agentD...
after the following settings, you can connect to the local server import store from . store import VueSocketio from vue-socket.io ; import socketio from socket.io-client ; Vue.use(VueSocketio, socketio( http: 127.0.0.1:7777 ),store); the...
problem description Chinese is garbled when a byte array transfer string is received through websocket the environmental background of the problems and what methods you have tried websocketUTF-8 vue related codes Please paste the code text...
is there a package for websocket that can be defined globally and used in various components? for example, how should js definitions in main.js or utils be introduced and used in various components? At the same time to solve the problem of frequent di...