zhangyanpeng
2020-01-22 a7c8080195f6b936b75a6a4129805e0a6766968f
vue.config.js
@@ -1,14 +1,18 @@
module.exports = {
   publicPath: '/',
   devServer: {
      proxy: {
         '/api/api': {
            target: 'http://192.168.31.233:8090',
            changeOrigin: true,
            pathRewrite: {
                  '^/api/api': ''
            }
         }
      }
   }
    // 修改的配置
    // 将baseUrl: '/api',改为baseUrl: '/',
    publicPath: '/',
    devServer: {
      port: 80,
        proxy: {
            '/api': {
                target: '192.168.31.233:8090',
                changeOrigin: true,
                ws: true,
                pathRewrite: {
                  '^/api': ''
                }
            }
        }
    }
}