vue/cli3配置

element-ui

vue-antd

 

 

vue-axios

import axios from "axios";

Vue.prototype.$axios = axios;

// vue.config.js 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
module.exports = {
    devServer: {
      host: "localhost",
      port: 8080, // 端口号
      https: false, // https:{type:Boolean}
      open: true, //配置自动启动浏览器
      // proxy: 'http://localhost:4000' // 配置跨域处理,只有一个代理
      // 配置多个代理
      proxy: {
        "/api": {
          target: "https://www.baidu.com",
          ws: true,
          changeOrigin: true,
          pathRewrite:{
              "^/api":''
          }
        },
      }
    }
  };

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章