VueCli3出现 [WDS] Disconnected!

vue.config.js中修改配置

localhost -> 127.0.0.1

disabledHostCheck: true

 

{
    disableHostCheck: true,
    proxy: {// 配置跨域
      '/': {
        target: 'http://127.0.0.1:3000/', // 这里后台的地址模拟的;应该填写你们真实的后台接口
        ws: false,
        changOrigin: true, // 允许跨域
        pathRewrite: {
          '^/': ''// 请求的时候使用这个api就可以
        }
      }
}

 

你可能感兴趣的:(vue)