我也不懂,這個可以解決 ws:false
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
? transpileDependencies: true,
? devServer: {
? ? open: false,
? ? host: '0.0.0.0',
? ? port: 8089,
? ? hot: true,
? ? https: false,
? ? proxy: {
? ? ? '/': {
? ? ? ? target: 'http://localhost:7776',
? ? ? ? ws: false, // 添加該配置以支持 WebSocket 代理
? ? ? ? changeOrigin: true,
? ? ? ? pathRewrite: {
? ? ? ? ? '^/': '/'
? ? ? ? }
? ? ? }
? ? }
? }文章來源:http://www.zghlxwxcb.cn/news/detail-737565.html
})文章來源地址http://www.zghlxwxcb.cn/news/detail-737565.html
到了這里,關(guān)于vue項目顯示 WebSocketClient.js:13 WebSocket connection to ‘ws://192.168.1.5:8089/ws‘ failed: Invalid fr的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!